1.0.15.31: thread-safe FIND-CLASS -- really this time
Call It Myopia: it turns out FIND-CLASSOID &co underneath FIND-CLASS
(when called for non-existent classes) were not thread-safe either.
* Get rid of *FIND-CLASS* hash-table, moving the actual PCL classes into
corresponding CLASSOID-CELL (new slot PCL-CLASS).
* Move classoid-cells from the infodb into into *CLASSOID-CELLS*
hash-table. We want to be able to lock around
(or (get-cell) (setf (get-cell) (make-cell)))
and infodb isn't really designed for that. This is the crux of
the breakage:
*** parallel writes to infodb are not thread safe! ***
* Lock over *CLASSOID-CELLS* and *FORWARD-REFERENCED-LAYOUTS*. The
latter should not be really necessary as long as we don't
assume (SETF FIND-CLASS) to be thread-safe, but easier to reason
about it this way. ...and it would be nice for the SETF to be safe
as well.
Related work:
* Don't create cells for non-exitent classes unless we know we are
going to need them -- previously both FIND-CLASSOID and FIND-CLASS
created a cell for every name they were called with, which is
isn't too good. This is especially important as once created these
cells never go away!
15 files changed: