Atomic Event.{wait,clear}

David Given dg at pearl.tao.co.uk
Wed Mar 14 05:54:26 EST 2001


In article <mailman.984557958.20327.python-list at python.org>,
	"Tim Peters" <tim.one at home.com> writes:
[...]
> Hard to guess what you're doing, but it sounds like you're using an Event as
> a "hey, there's something to do!" signal, where there will be something to do
> more than once over the life of your job.

I had another look at the documentation, and it seems a Lock is easiest
for what I want to do (I have a thread that does complicted stuff, and a
message queue that tells it what to do; I use the Lock to block when the
queue is empty). Everything seems to work, and I don't have a race
condition any more. Ta.

-- 
+- David Given ---------------McQ-+ "USER'S MANUAL VERSION 1.0:  The
|  Work: dg at tao-group.com         | information presented in this publication
|  Play: dgiven at iname.com         | has been carefully for reliability." ---
+- http://wired.st-and.ac.uk/~dg -+ anonymous computer hardware manual         



More information about the Python-list mailing list