Sig,

What about things like managing connections to remote hosts?  Do I have a 
socket going over there?  No??  Let's make one.  Sounds like a great job for a 
shared dictionary.

Bill



-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Igor Stasenko
Sent: Thursday, October 22, 2009 8:34 PM
To: [email protected]
Subject: Re: [Pharo-project] Thread-safe collections

2009/10/23 Martin McClure <[email protected]>:
>
> It's probably possible to write a hashed collection that is 
> thread-safe and semaphore-free for both read and write, but unless 
> there's a very specific requirement for that it's probably simpler, 
> faster, and more reliable to just use a semaphore.
>
+1.
If you traveling into the field of concurrency, you have to change the mindset.
You should pick different abstractions for that. And collections is one which 
you should leave to grow in single-threaded woods.
Or.. of course.. you can attempt to make them thread-safe.. But it will be 
clumpsy , rigid and very error prone.

> Regards,
>
> -Martin
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to