All Manuals > LispWorks User Guide and Reference Manual > 44 The MP Package

NextPrevUpTopContentsIndex

process-exclusive-lock

Function
Summary

Like process-lock, but on a "sharing" lock.

Package

mp

Signature

process-exclusive-lock sharing-lock &optional whostate timeout

Arguments

sharing-lock

A sharing lock.

whostate

The status of the process while lock is locked, as seen in the Process Browser.

timeout

A non-negative real or nil.

Description

The function process-exclusive-lock is the same as process-lock, but on a "sharing" lock. It waits until sharing-lock is free before locking it in exclusive mode.

Calls to process-exclusive-lock should be paired with process-exclusive-unlock calls. In most cases the macro with-exclusive-lock the best way to achieve this.

Notes

It is not possible to use exclusive lock in the scope of a sharing lock on the same lock, and trying to do this will cause the process to hang. Whether it is possible to use an exclusive lock inside an exclusive lock of the same lock is determined by the recursivep argument in make-lock.

process-exclusive-lock is guaranteed to return if it locked sharing-lock, but may throw before locking, as described in Guarantees and limitations when locking and unlocking.

See also

make-lock
process-lock
with-exclusive-lock
Locks


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex