All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

with-ring-locked

Macro
Summary

Locks a ring such that no other thread can access it while some code is executed.

Package

hcl

Signature

with-ring-locked (ring &optional whostate timeout) &body body => result

Arguments

ring

A ring object created by make-ring.

whostate

The status of the process while the ring is locked.

timeout

A timeout period, in seconds.

body

Lisp code.

Values

result

The result of executing body.

Description

The macro with-ring-locked locks the ring ring that during the execution of body no other thread can access ring, whether for modification or merely reading values.

whostate and timeout are used in the same way as in with-lock.

See also

make-ring


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex