Atom

task.status()

Reports task or coroutine state.

Signature

task.status(handle)

Parameters

Owned coroutine or task.

Returns

State string ready, suspended, running, returned, failed or cancelled as applicable.

Behavior

Observes a snapshot of the current state.

Errors

Invalid or foreign handle.

Example

Atom
use task
func pause():
    yield 1
c = create(coroutine, pause)
assert(task.status(c) == 'ready')