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

Paul Rubin http
Wed Jan 10 14:30:47 CET 2007

"Hendrik van Rooyen" <mail at> 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