Atom

task.send()

Enqueues a message.

Signature

task.send(channel, value[, timeout])

Parameters

Channel, transferable value and optional duration or null, default unlimited.

Returns

True.

Behavior

Copies before sending. If the queue is full, waits for space.

Errors

Closed channel, timeout, interruption or transfer failure.

Example

Atom
use task
q = task.channel()
assert(task.send(q, null))
assert(task.receive(q).open)
task.close(q)