On Fri, 18 Jan 2013 20:58:41 +0100
Peter Enerccio <enerc...@gmail.com> wrote:

> Hello, I have a question.
> Are special variables safe for multithreading?
> Ie, if one thread sets them, others will not be changed?

Because of their dynamic nature, if they are bound by a thread, they
can safely be used by that thread afterwards without interference,
indeed, as their binding becomes thread-local.  If however a dynamic
variable is used without local rebinding, you might need to also
protect their access using a lock depending on how you use them (this
then allows process-shared objects to be shared among threads and
accessed like globals).

If you however want to create them from a thread using
defparameter/defvar, I'd have to check but my guess is that ECL uses
the necessary locks internally for its own package/symbol management.
My experience is with special variables to be created before the other
threads are launched.

I hope this helps,
-- 
Matt

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to