> This works for me. But I'd like to know if this is considered > Pythonic, and if there are other, better ways of doing the above in > Python.
>From the Python point of view, it's fine. However, it uses busy-wait, which I consider bad style (in any language). > 3) Make a custom thread-safe queue class, with an 'interrupt_get' > method. When your app calls queue.interrupt_get(), all threads > currently locking on a queue.get() will continue, but with a > GetInterrupted exception thrown. That's what I would do. I'd use the existing Queue class as a base class, though, rather than starting from scratch. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list