Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-97696: Initial work on eager tasks #98137

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Oct 10, 2022

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.

This is PYthon only, and has no tests or docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants