Effect Concurrentpub

Source
:effect(pub) Concurrent
  .spawn (  AnyUInt )
  .await ( AnyUInt  )
  .cancel ( AnyUInt  )
  .yield-now (  )
  .timeout ( AnyInt AnyUInt  Bool )
Description

Concurrent effect — async task spawn / await / cancel / timeout. Task handles are carried as AnyUInt identifiers and durations as AnyInt (interpreted by the host) in this placeholder decl.

Parent chain:IOConcurrent

Operations

.spawn ( AnyUInt )

Spawn a new task; returns a task handle identifier.

.await ( AnyUInt )

Suspend until the task completes; consumes the handle.

.cancel ( AnyUInt )

Request cancellation of the task; consumes the handle.

.yield-now ( )

Cooperatively yield execution to the scheduler.

.timeout ( AnyInt AnyUInt Bool )

Wait up to n units for the task; true on completion, false on timeout.