Method in task · Task compiler

Task::join

pub fn join() -> Result<R, TaskError>
Import
use task::{Task};
Source: compiler/src/prelude/task.hy

Waits for the task to finish and returns its value.

This is a suspension point: other tasks run while it waits.

Called on a Task value as value.join(…).

Returns#

Result<R, TaskError>

Errors#

Err(TaskError::Panicked(message)) when the task panicked and Err(TaskError::Cancelled) when it was cancelled.

Panics#

Panics with task deadlock when every task is waiting on another one.

See also#

  • Task: A handle to a child task started with Scope::spawn.
  • Task::cancel: Asks the task to stop.
↑ ↓ navigate ↵ open