glass.saga / gmail.com wrote:
> Issue #9145 has been updated by Glass_saga (Masaki Matsushita).
> 
> Status changed from Feedback to Closed
> 
> Currently, Queue#pop takes non_block flag. 

No, I don't think this should be closed.

I think Justin's point was:

Currently, it is impossible to know if a queue is closed
(permanent condition) or if it is empty (temporary condition).
So at the very least, a different exception should be raised:

Justin Collins wrote:
	> Alternatively, raise an exception that is a subclass of
	> ThreadError with a more specific name, such as "QueueEmpty".
	> This would be a small improvement while remaining compatible
	> with existing code.



On a side note, relying on exceptions for flow control has all
the same performance and $DEBUG noise problems it did with
IO#*_nonblock [ruby-core:38666] [Feature #5138]

But thinking of an efficient API for that is tricky :<

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>