Is there a way to protect a piece of critical code?

Paul Rubin http
Wed Jan 10 08:30:47 EST 2007


"Hendrik van Rooyen" <mail at microcorp.co.za> writes:
> I would like to do the following as one atomic operation:
> 
> 1) Append an item to a list
> 2) Set a Boolean indicator

You could do it with locks as others have suggested, but maybe you
really want the Queue module.



More information about the Python-list mailing list