[Python-Dev] defaultdict proposal round three

Ian Bicking ianb at colorstudy.com
Mon Feb 20 22:47:45 CET 2006


Guido van Rossum wrote:
> Why are you so keen on using a dictionary to share data between
> threads that may both modify it? IMO this is asking for trouble --
> the advice about sharing data between threads is always to use the
> Queue module.

I use them often for a shared caches. But yeah, it's harder than I 
thought at first -- I think the actual cases I'm using work, since they 
use simple keys (ints, strings), but yeah, thread guarantees are too 
difficult to handle in general. Damn threads.
-- 
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /