Queue
Like Ruby's Queue class, but allowing both pushing and unshifting objects.
@api private
@param [Object] obj @return [void]
# File lib/cinch/open_ended_queue.rb, line 10 def unshift(obj) t = nil @mutex.synchronize{ @que.unshift obj begin t = @waiting.shift t.wakeup if t rescue ThreadError retry end } begin t.run if t rescue ThreadError end end
[Validate]
Generated with the Darkfish Rdoc Generator 2.