Handbook
Glossary
with-write-lock ( lock quot -- )
Locks
ยป
Read-write locks
Prev:
with-read-lock ( lock quot -- )
Next:
with-read-lock-timeout ( lock timeout quot -- )
Vocabulary
concurrency
.
locks
Inputs
lock
a
lock
quot
a
quotation
Outputs
None
Word description
Calls the quotation, ensuring that no other thread is holding a read or write lock at the same time. If another thread is holding a read or write lock, blocks until the thread releases the lock.
Definition
USING:
kernel
;
IN:
concurrency.locks
:
with-write-lock
( lock quot -- )
f
swap
with-write-lock-timeout
;
inline