2009/10/23 Schwab,Wilhelm K <bschwab@anest.ufl.edu>:
Hello all,
I just looked around for thread-safe collections, and found nothing that looks like a shared dictionary. Â The squeak-dev archives contain the obligatory newbie posts (wanting all collections to be thread safe) and the expected replies, some of which are overly dismissive of the idea. Â Something that protects things like #at:ifAbsentPut: and friends is _really_ useful. Â Am I missing an existing implementation?
Imo, there's only one shared collection which is useful - shared queue. :) If you need more kinds of thread-safe collections, it probably indicating that the concurrent code (or model) which you designed is in pretty bad shape. Just compare two following snippets: 1 to: 100 do: [:i | collection threadSafeAt: i put: something]. and: semaphore critical: [ 1 to: 100 do: [:i | collection at: i put: something] ]. What you think, which one is better?
Bill
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.