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

Joseph Oswald josephoswald at gmail.com
Sun May 28 20:57:22 UTC 2006


David--

  Thanks for the very helpful response. I think that will work for me.

  A few additional questions for you or the list: there might arise
some condition that indicates that no more packets will be coming in.
Is there a way to know how many consumers were waiting, and to unblock
them (presumably, after they wake up, they will check for this "closed
condition" and go away without a packet)? ccl::semaphore-value?
A workaround might be timed-wait-on-semaphore to allow a periodic check.

  Furthermore, is there any need to destroy semaphores when the
connection goes away? Are they a limited OS resource?

--Joe

On 5/25/06, David L. Rager <ragerdl at cs.utexas.edu> 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 semaphore allows for efficient (fast) signaling between threads.  From the
> "make-semaphore" documentation:




More information about the Openmcl-devel mailing list