rontolisp:mutex-acquire
(rontolisp:mutex-acquire mutex)
Blocks until the calling thread holds mutex (created by
rontolisp:make-mutex), then returns the mutex. Prefer
rontolisp:with-mutex, which releases the lock even
when the body exits by signalling an error; a bare mutex-acquire whose matching
rontolisp:mutex-release is skipped leaves the lock held
forever.
The lock is reentrant, so a thread that already holds it acquires it again immediately and must release it once per acquisition. On both WASM backends there is only one thread, so this is a no-op that returns its argument.
Limitations
- There is no non-blocking or timed acquisition.
- A value that is not a mutex handle is an error.