Mojo function
create_task
create_task(owned handle: Coroutine[type, origins], out task: Task[type, origins])
Run the coroutine as a task on the AsyncRT Runtime.
This function creates a task from a coroutine and schedules it for execution on the async runtime. The task will execute asynchronously without blocking the current execution context.
Args:
- handle (
Coroutine[type, origins]
): The coroutine to execute as a task. Ownership is transferred.
Returns:
The task
output parameter is initialized with the created task.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!