Is Set growth thread-safe?
lex at lexspoon.org
Fri Sep 23 14:30:17 UTC 2005
Thread-protecting the changed-update mechanism would seem like a
reasonable thing, as would protecting the general event mechanism it
already isn't. These are small portions of code that are useful outside
of the GUI thread.
Instead of hardening the collection classes, though, it is likely much
easier to add a Monitor to the class vars of class object and use that
to protect critical regions.
Anyway, if it doesn't get fixed, a comment would seem in order, because
we now have an existence proof of intelligent people being burned by
Oh, and along these lines, a motivated person might want to add a
"Thread-Safe Libraries" page in Squeak saying what is (SharedQueue,
Monitor, addDeferedUIMessage:) and isn't (almost everything) thread-safe
in Squeak. IMHO, these pages are shaping up into a nice chunk of
material for new Squeakers considering the use of threads, and are at
the borderline of being required reading for serious Squeakers.
More information about the Squeak-dev