You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
process.done(): wait for another process to finish; result.state is 'completed' or 'interrupted' (with the error).
yield* anyOf([...]): wait for the first of several branches (resource/buffer/store requests, event.wait(), process.done(), timeout(n)). Pending branches are cancelled automatically; result.winner, result.index and result.completed describe the outcome. Enables reneging and balking patterns.
yield* allOf([...]): wait until every branch has completed (barrier / join).
New exports ProcessDoneRequest, AnyOfRequest, AllOfRequest, Waitable and the helpers anyOf, allOf; Process.interruptReason getter.
Example examples/bank-renege/: customers leave when their patience runs out.
Fixed
Interrupting a waiting process now cleans up its request. Previously a process interrupted while queued for a Resource, Buffer or Store stayed in the queue and was later granted the unit, which leaked capacity. All pending waits (queued requests, timeouts, event waiters, done() subscriptions) are cancelled on interrupt(). A grant that arrives in the same instant a process stops waiting is given back.
A waitFor() poll no longer keeps running after the process handled an interruption and moved on.
Internal
Resource._cancelAcquire, Buffer._cancelPut/_cancelGet, Store._cancelPut/_cancelGet remove a queued request by callback identity.
The two copies of the yield dispatch in Process were merged into one.