On 2008-06-07, David <[EMAIL PROTECTED]> wrote:
> Would it be possible for a 3rd-party threading library to an
> 'interruptible' version of Queue?
>
> The same methods as the normal Queue, but when you call a new .kill()
> method on the queue, all the threads locking on the queue get a
> "QueueKilled" exception thrown.

I have done something similar. The idea was that threads had to open
a queue before they could access it. If the last thread who had the
queue open in write mode, closed the queue, a reader trying to get
an element from an empty queue would have an "EOInformation" exception
raised.

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

Reply via email to