#35245: Django freezes on async views with asycio.gather and an async ORM call
-------------------------------------+-------------------------------------
     Reporter:  Luis Grau Martín     |                    Owner:  nobody
  Maldonado                          |
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  5.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  ORM, async, bug      |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by willzhao):

 
[https://github.com/LuisGMM/django_bug/blob/a43fb2584c7a15ecd2ada16b9f90fe1df7fe841c/project/app/providers/base.py#L8]
 {{{#!python
 items_lists = await asyncio.gather(*[MyProvider().get()])  # blocked
 items_lists = await asyncio.gather(MyModel.objects.afirst())  # blocked
 items_lists = await asyncio.gather(MyModel.objects.acreate())  # blocked
 items_lists = await MyProvider().get()  # works
 }}}
 It's indeed a weird issue
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35245#comment:4>
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/0107018dd4eb52c1-2d1a5c32-9089-4a49-a720-c229d95ed9e4-000000%40eu-central-1.amazonses.com.

Reply via email to