IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

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 be Movable to extract the result.
  • origins (OriginSet): The origin set from the coroutine's captures.

Args:

Returns:

RaisingTask[type, origins]: The task output parameter is initialized with the created task.