threads and sleep?
Piet van Oostrum
piet at cs.uu.nl
Fri Jul 15 14:00:15 EDT 2005
>>>>> Christopher Subich <spam.csubich+block at block.subich.spam.com> (CS) wrote:
>CS> Hrm... this would suggest the possibility of designing a metaclass,
>CS> perhaps, that would ensure synchronous access to an object. Perhaps "wrap"
>CS> the class in another, that gets and releases a mutex on any external
>CS> get/set access (except, possibly, for a specified list of "asynchronous"
>CS> data members and methods).
Sometimes that's not enough, because you may have to synchronise access to
a couple of objects, or to multiple operations on some object(s). The
system can't know the required granularity of locking, only the application
programmer knows that.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list
mailing list