A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw71/LW/html/lw-1004.htm below:

lock-owner

Description

The function lock-owner returns the process that currently owns lock, or nil.

If lock is a "sharing" lock then lock-owner checks whether it is locked exclusively (see lock-owned-by-current-process-p).

If lock is locked then result is normally the process that locked it. If lock was locked while multiprocessing was not running then result is t. Also, if lock was locked by an unknown process (for example, the process is killed while holding lock) then result is :unknown.

result is nil if lock is not locked.

Example
CL-USER 1 > (let ((lock (mp:make-lock :name
                                      "my lock")))
              (mp:lock-owner lock))
NIL
 
CL-USER 2 > (let ((lock (mp:make-lock :name
                                      "my lock")))
              (mp:with-lock (lock)
                (mp:lock-owner lock)))
#<MP:PROCESS Name "CAPI Execution Listener 1" Priority 0 State "Running">

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4