[armedbear-devel] CLOS thread safety

Erik Huelsmann ehuels at gmail.com
Sat Apr 24 14:50:17 UTC 2010

Hi David,

> Are there any known thread safety issues with CLOS?  I've been
> getting some weird MOP errors that I made go away by redefining
> slot-value such that it has to acquire a global lock before it can do
> anything.  I assume that the problem is in my code: but the threads
> that are executing when I get the failures share no code (or
> variables), and every time the errors pop up slot-value is on the
> callstack someplace.

Well, there have not been any specific threading issues mentioned.
Over two years ago, back when I started doing ABCL, there were
threading issues which looked like threading issues in CLOS. They
turned out to be threading issues in the compiler though.

Having said that, I see there have not been taken synchronization
measures on a high level: there are no locks and
threads:synchronized-on blocks in clos.lisp. There are some
synchronized calls on the Java side; I'm not sure the low-level
protection is good enough to maintain consistency though.

Can you share some examples which show the issues here? Adding
thread-safety to clos.lisp - in specific, targeted places - should be
well doable.



More information about the armedbear-devel mailing list