Handbook
Glossary
with-read-lock ( lock quot -- )
Locks
ยป
Read-write locks
Prev:
<rw-lock> ( -- lock )
Next:
with-write-lock ( lock 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 write lock at the same time. If another thread is holding a write lock, blocks until the thread releases the lock.
Definition
USING:
kernel
;
IN:
concurrency.locks
:
with-read-lock
( lock quot -- )
f
swap
with-read-lock-timeout
;
inline