Mutex: Difference between revisions

Content added Content deleted
(J)
Line 707: Line 707:


<lang J> name=. 10 T. 0 NB. create an exclusive mutex
<lang J> name=. 10 T. 0 NB. create an exclusive mutex
name=. 10 T. 1 NB. create a shared (aka "recursive") mutex
name=. 10 T. 1 NB. create a shared (aka "recursive" or "reentrant") mutex
failed=. 11 T. mutex NB. take an exclusive lock on a mutex (waiting forever if necessary)
failed=. 11 T. mutex NB. take an exclusive lock on a mutex (waiting forever if necessary)
failed=. 11 T. mutex;seconds NB. try to take an exclusive lock on a mutex but may time out
failed=. 11 T. mutex;seconds NB. try to take an exclusive lock on a mutex but may time out