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 the lock is locked, as seen in the Process Browser.

timeout

A timeout interval, in seconds.

Description

The function process-exclusive-lock is the same as process-lock, but on a "sharing" lock. It waits until the lock is free before locking 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 process, but may throw before locking, as described in Guarantees and limitations when locking and unlocking.

See also

make-lock
process-lock
with-exclusive-lock


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex