From: Nikodemus S. <de...@us...> - 2008-12-12 12:27:08
|
Update of /cvsroot/sbcl/sbcl/doc/internals-notes In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32315/doc/internals-notes Modified Files: threading-specials Log Message: 1.0.23.37: more CLOS and classoid thread safety * Rename *BIG-COMPILER-LOCK* as *WORLD-LOCK*. * Use it to protect classoids, layouts/wrappers, obsolete instance updating, etc. * Rename sevaral functions which assume their callers are holding the lock to have % prefix. Perhaps we should have a separate prefix convention for "requires called to lock"? Or a nifty macro layer? (Actually there are probably places where read/write locks (or STM!) would be a win...) * ENSURE-CLASS-USING-CLASS needs to set up type translations only while PCL is being build. * DEFCLASS and ENSURE-CLASS-USING-CLASS are now expected to be thread safe. * Test-case for parallel defclass and make-instance. Index: threading-specials =================================================================== RCS file: /cvsroot/sbcl/sbcl/doc/internals-notes/threading-specials,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- threading-specials 1 Aug 2008 07:57:52 -0000 1.21 +++ threading-specials 12 Dec 2008 12:27:01 -0000 1.22 @@ -97,19 +97,11 @@ = PCL -The PCL authors thought a bit about thread safety, adding -(without-interrupts ...) in some places to protect critical forms. -We've implemented their without-interrupts macro as an acquitision of -*pcl-lock*, so we hope they've done it properly. - -Largish parts of PCL should also be protected by the compiler lock, -but sometimes it can be hard to tell... - -The most suspicious parts should probably be tested by asserting -at various sites that the *PCL-LOCK* is held. +Critical parts of PCL are protected by *world-lock* (particularly +those dealing with class graph changes), and some with finer-grained locks. accesses locked with a nice granularity - SB-PCL::*FIND-CLASS* + SB-PCL::*CLASSOID-CELLS* read-only & safe: SB-PCL::*BUILT-IN-TYPEP-COST* |