"Glass_saga (Masaki Matsushita)" <glass.saga / gmail.com> wrote:
> I think we can't change default behavior of Queue#pop(true) because some code expects ThreadError to be raised.
> However, it may be possible to introduce new keyword argument like following:
> 
> q = Queue.new
> while next_item = q.pop(true, exception: false) # it doesn't raise ThreadError and returns nil.
>   # do something
> end

+1 to that.  All non-blocking methods (I/O or not) should support
exception: false to avoid (expensive/noisy-on-$DEBUG=$true) exceptions.