Handbook
Glossary
with-semaphore ( semaphore quot -- )
Counting semaphores
Prev:
release ( semaphore -- )
Next:
with-semaphore-timeout ( semaphore timeout quot -- )
Vocabulary
concurrency
.
semaphores
Inputs
semaphore
a
semaphore
quot
a
quotation
Outputs
None
Word description
Calls the quotation with the semaphore held.
Definition
USING:
continuations
kernel
;
IN:
concurrency.semaphores
:
with-semaphore
( semaphore quot -- )
swap
dup
acquire
[
release
]
curry
finally
;
inline