#36315: use task groups/cancel scopes where possible
-------------------------------------+-------------------------------------
     Reporter:  Thomas Grainger      |                    Owner:  Thomas
                                     |  Grainger
         Type:  Uncategorized        |                   Status:  assigned
    Component:  Uncategorized        |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Thomas Grainger):

 * owner:  (none) => Thomas Grainger


Old description:

> eg replace asyncio.create_task with a Task Group
> replace wait_for/wait with Timeout/CancelSceop
> create a function for asyncio.gather that uses a Task Group
>
> This could use anyio.create_task_group and anyio.CancelScope, but now
> there's 3.11 asyncio.TaskGroup and asyncio.Timeout are available.
>
> Obviously I'm biased and think the anyio versions are a better choice,
> but it's easier to add asyncio.TaskGroup/Timeout and worry about trio
> support in the 'future'.

New description:

 eg replace asyncio.create_task with a Task Group
 replace wait_for/wait with Timeout/CancelScope
 create a function for asyncio.gather that uses a Task Group

 This could use anyio.create_task_group and anyio.CancelScope, but now
 there's 3.11 asyncio.TaskGroup and asyncio.Timeout are available.

 Obviously I'm biased and think the anyio versions are a better choice, but
 it's easier to add asyncio.TaskGroup/Timeout and worry about trio support
 in the 'future'.

--
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36315#comment:1>
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 visit 
https://groups.google.com/d/msgid/django-updates/010701961ed4680d-3fe41b00-2dcd-4919-9d23-eba43c4251c7-000000%40eu-central-1.amazonses.com.

Reply via email to