Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add docstring to create_eager_task_factory
  • Loading branch information
jbower-fb authored May 6, 2023
commit 86c8b430abd123c99aab11cec73c0fc274662b02
7 changes: 7 additions & 0 deletions Lib/asyncio/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,13 @@ def callback():


def create_eager_task_factory(custom_task_constructor):
"""
Creates a function suitable for use as a task factory on an event-loop.
The tasks created will be started immediately (rather than being first
Comment thread
jbower-fb marked this conversation as resolved.
Outdated
scheduled to an event loop). The constructor argument can be any callable
that constructs a Task-compatible object and supports the eager_start
keyword argument.
Comment thread
jbower-fb marked this conversation as resolved.
Outdated
"""

def factory(loop, coro, *, name=None, context=None):
return custom_task_constructor(
Expand Down