You might also want to replace those 'pass' statements when smartqueue is empty or full with time.sleep() to avoid busy waiting.
I misunderstood your post, sorry. My smartqueue class has a timeout parameter, and it can block for an item, or raise the Full/Empty exception after timeout exceeded. That is 1 second in my example program:

self.incoming.put(data,1)
data = self.outgoing.get(1)





--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to