On 24 October 2011 22:03, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > mark florisson wrote: >> >> These will by default not lock for operations to allow >> e.g. one thread to iterate over the list and another thread to index >> it without lock contention and other general overhead. > > I don't think that's safe. You can't say "I'm not modifying > this, so I don't need to lock it" because there may be another > thread that *is* in the midst of modifying it.
I was really thinking of the case where you instantiate it in Cython and then do some parallel work, in which case you're the only user. But you can't assume that in general. > -- > Greg > _______________________________________________ > cython-devel mailing list > cython-devel@python.org > http://mail.python.org/mailman/listinfo/cython-devel > _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel