This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients asvetlov, dhalbert, gvanrossum, iritkatriel, njs, yselivanov
Date 2022-02-16.18:14:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645035257.77.0.426956287188.issue46752@roundup.psfhosted.org>
In-reply-to
Content
> There's one thing that gather() does that TaskGroup doesn't: it gives us the return values from the tasks.

That's easy to do with task groups too:

  async with TaskGroup() as g:
      r1 = g.create_task(coro1())
      r2 = g.create_task(coro2())

  print(r1.result())

  # or
  print(await r2)  # I *think* this should work
History
Date User Action Args
2022-02-16 18:14:18yselivanovsetrecipients: + yselivanov, gvanrossum, njs, asvetlov, dhalbert, iritkatriel
2022-02-16 18:14:17yselivanovsetmessageid: <1645035257.77.0.426956287188.issue46752@roundup.psfhosted.org>
2022-02-16 18:14:17yselivanovlinkissue46752 messages
2022-02-16 18:14:17yselivanovcreate