[Openmcl-devel] 3 questions - TLS the default? global thread-shared vars? .CDB gen broken?
Raffael Cavallaro
raffaelcavallaro at mac.com
Fri Mar 18 22:21:25 PDT 2011
On Mar 19, 2011, at 1:09 AM, Jason E. Aten wrote:
> In order words, when two different threads need to be able to name the same variable (after locking the thread inspects the shared variable, possibly updates it, then releases the lock), how do I tell lisp this is what I'd like?
See section 4.8 of the documentation "Static Variables"
e.g., (defstatic *foo* 3)
It's an error to dynamically rebind a static variable; its value is always the same across all threads. Naturally, as you suggest, you'll want to avoid race conditions by using a lock or semaphore.
warmest regards,
Ralph
Raffael Cavallaro
raffaelcavallaro at me.com
More information about the Openmcl-devel
mailing list