Handbook
Glossary
<count-down> ( n -- count-down )
Count-down latches
Next:
count-down ( count-down -- )
Vocabulary
concurrency
.
count-downs
Inputs
n
a non-negative integer
Outputs
count-down
a
count-down
Word description
Creates a new count-down latch.
Errors
Throws an error if the count is lower than zero.
Definition
USING:
concurrency.promises
kernel
math
;
IN:
concurrency.count-downs
:
<count-down>
( n -- count-down )
dup
0
<
[
invalid-count-down-count
]
when
<promise>
\
count-down-tuple
boa
dup
count-down-check
;