cpython icon indicating copy to clipboard operation
cpython copied to clipboard

GH-97696: Initial work on eager tasks

Open gvanrossum opened this issue 3 years ago • 0 comments

This defines an event loop method eager_task_factory() that can be made the task factory using loop.set_task_factory(loop.eager_task_factory). It will then return a Future if the coroutine completed (or failed) without ever suspending itself.

As a TEMPORARY demonstration (to be revisited), for now we call this factory from TaskGroup.create_task(), if the loop implementation defines it.

  • Issue: gh-97696

gvanrossum avatar Oct 10 '22 04:10 gvanrossum