Mojo function
create_raising_task
create_raising_task[type: Movable, origins: OriginSet](var handle: RaisingCoroutine[type, origins], out task: RaisingTask[type, origins])
Run a raising coroutine as a task on the AsyncRT Runtime.
Creates a task from a raising coroutine and schedules it for execution. The task may raise an error when waited on, propagating any error from the coroutine.
Parameters:
- โtype (
Movable): The result type, which must beMovableto extract the result. - โorigins (
OriginSet): The origin set from the coroutine's captures.
Args:
- โhandle (
RaisingCoroutine): The raising coroutine to execute as a task. Ownership is transferred.
Returns:
RaisingTask: 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!