#33882: Allow transaction.atomic to work in async contexts.
-------------------------------------+-------------------------------------
     Reporter:  alex                 |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  4.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  async                |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Tim Graham:

Old description:

> Wouldn't it be possible to add something like:
>
>     __aenter__ = sync_to_async(Atomic.__enter__, thread_sensitive=True)
>     __aexit__ = sync_to_async(Atomic.__exit__, thread_sensitive=True)
>
> to the Atomic class to support async calls?

New description:

 Wouldn't it be possible to add something like:
 {{{ #!python
     __aenter__ = sync_to_async(Atomic.__enter__, thread_sensitive=True)
     __aexit__ = sync_to_async(Atomic.__exit__, thread_sensitive=True)
 }}}
 to the Atomic class to support async calls?

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33882#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701825f0f399e-416dff1f-7ac5-4b10-b93a-9abf5e1718f7-000000%40eu-central-1.amazonses.com.

Reply via email to