[Cython] Acquisition counted cdef classes

mark florisson markflorisson88 at gmail.com
Mon Oct 24 23:52:35 CEST 2011

On 24 October 2011 22:03, Greg Ewing <greg.ewing at 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 at python.org
> http://mail.python.org/mailman/listinfo/cython-devel

More information about the cython-devel mailing list