class

Tasker::Future(R)

Inherits Future::Compute < Reference < Object

Constructors

new(block : -> R)
Source

Instance methods

cancel(msg)

We'll force the state into canceled as we use this to prevent rescheduling

Source
complete

Records the terminal state once the callback has finished. The task invokes this under its own lock — the same lock #cancel holds — so completion and cancellation are serialised without this class needing a mutex of its own. Completion never overwrites a cancel, so state == Canceled reliably means "the user cancelled; do not reschedule".

Source
state

The future is holding the state for our scheduled task

Source
trigger

As we are controlling the delay we need direct access to run_compute

Source
wait_complete

We also want direct access to wait without grabbing the computed response

Source