[Openmcl-devel] Managing multi-threaded access to list

Gary Byers gb at clozure.com
Fri May 26 00:07:52 PDT 2006



On Thu, 25 May 2006, David L. Rager wrote:

> Hi Joseph,
>
> You are missing a basic building block: the semaphore.  Also, you should use
> the exported function (ccl:make-lock) instead of the non-exported
> make-read-write-lock.

A minor clarification: the symbol CCL:MAKE-READ-WRITE-LOCK is exported
and the function it names is documented.  It creates a lock which can
be locked by multiple simultaneous readers or by a single writer.

It's probably not the best choice here for your producer/consumers situation
(though you -could- probably make it work.)

However you handled locking, David's suggestion about using a semaphore
is good advice.




More information about the Openmcl-devel mailing list