Thanks all, and special thanks to Jeff Shannon for pointing out the Queue
object.

I used the Queue. It's going good now. And I used the blocking get method,
so it has almost cpu usage when idle. :)

It was reading data from 4 serial ports (one on each thread) and the
consumer thread was pattern checking the data, to see which port our
hardware is installed on.

In the main thread is a wxPython app. If there's no H/W attached we allow
the user to go cancel, which must stop the thread.

So to cancel, we send the string 'quit' on the queue :)

Thanks again. I didn't know about Queue.

Matthew Sherborne

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to