Stefan Behnel wrote:
One question: what does that mean for the mutable bytearray class? How would
that handle locking?
In a single-threaded app, or one where only a single thread at a time
can access the object providing the buffer interface, no locking is
needed (that's the main advantage of the approach of handing over
reference ownership by means of Queue objects). In a multi-threaded app
where multiple threads can access it simultaneously, it needs to be
protected by locks just like any other resource that is shared between
multiple threads.
No need to confuse the question of memory access with the question of
thread synchronisation.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com