The Symbol table is another very useful collection that should be thread-safe. From my experience in VW, getting that to be both fast and thread-safe can be a bit tricky. For example, the debugger should not create symbols while debugging because you could be debugging the critical section of the symbol table internment... Igor Stasenko wrote:
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