Skip to content

Latest commit

 

History

History
117 lines (75 loc) · 3.61 KB

File-std-concurrent-task-ml-139288457.md

File metadata and controls

117 lines (75 loc) · 3.61 KB

std/concurrent/task.ml

Home · Files

Provides the std concurrent task package.

Package: std.concurrent.task

Reachable from entry: no

Imports

Declarations

run

function run(pool, callback, data)

Schedule a conventional one-argument callback on an existing pool.

Parameter Type Default Description
pool dynamic — Value supplied for pool.
callback dynamic — Value supplied for callback.
data dynamic — Data to process.

Source: std/concurrent/task.ml:118

runCancellable

function runCancellable(pool, callback, data)

Schedule callback(data, token) and return a future which can request cancel.

Parameter Type Default Description
pool dynamic — Value supplied for pool.
callback dynamic — Value supplied for callback.
data dynamic — Data to process.

Source: std/concurrent/task.ml:128

TASK_ERROR

const TASK_ERROR = 1651

Track the task error value used by this standard-library module.

Source: std/concurrent/task.ml:16

whenAll

function whenAll(futures)

Wait for every future in input order and return the equally ordered results.

Parameter Type Default Description
futures dynamic — Value supplied for futures.

Source: std/concurrent/task.ml:141

whenAny

function whenAny(futures)

Provide the when any operation for this standard-library module.

Parameter Type Default Description
futures dynamic — Value supplied for futures.

Source: std/concurrent/task.ml:197

whenAnyFor

function whenAnyFor(futures, milliseconds)

Return the first completed future index, or -1 after the timeout. A negative timeout waits indefinitely; zero performs a non-blocking observation.

Parameter Type Default Description
futures dynamic — Value supplied for futures.
milliseconds dynamic — Maximum duration in milliseconds.

Source: std/concurrent/task.ml:158