Promises


The concurrency.promises vocabulary implements promises, which are thread-safe write-once variables. Once a promise is created, threads may block waiting for it to be fulfilled; at some point in the future, another thread may provide a value at which point all waiting threads are notified.
promise

<promise> ( -- promise )

fulfill ( value promise -- )

?promise ( promise -- result )

?promise-timeout ( promise timeout -- result )