Actions
Feature #11122
openexception-free non-blocking Queue/SizedQueue operations
    Feature #11122:
    exception-free non-blocking Queue/SizedQueue operations
  
Description
I would like to reduce exceptions for non-blocking operations on
Queue/SizedQueue in the same way we are reducing exceptions for non-blocking
I/O with *_nonblock(..., exception: false) methods.
However, I'm unclear what the API would be, since queues return Ruby objects
instead of String buffers or number of bytes written, so any special
object/symbol we would return could conflict with existing applications.
Perhaps something like:
queue.pop(nonblock: :WAIT)
queue.push(obj, nonblock: :WAIT)
Which would allow user to specify which object to raise when a queue is empty
or full (similar to Timeout.timeout allowing specific exception to raise).
        
           Updated by hsbt (Hiroshi SHIBATA) over 1 year ago
          Updated by hsbt (Hiroshi SHIBATA) over 1 year ago
          
          
        
        
      
      - Status changed from Open to Assigned
Actions