Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Thing » Mutex » lock
next | previous | forward | backward | up | index | toc

lock -- lock a mutex

Description

Locks a mutex.

i1 : m = new Mutex

o1 = m

o1 : Mutex
i2 : lock m

If the mutex is already locked, then the thread blocks until it is unlocked. This is not interruptible.

See also

Ways to use lock:

  • lock(Mutex)

For the programmer

The object lock is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/Macaulay2Doc/doc_mutex.m2:91:0.