0.0
No release in over 3 years
Like Queue but with a pop timeout and a few other things
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

timeout_queue

It's like Queue except:

  • #pop has an optional timeout
  • #unshift will put an object on the front of the queue
  • #delete can remove an object from the queue

Usage

Install as a Gem using your preferred method.

Require:

require 'timeout_queue'

Use:

q = TimeoutQueue.new

begin

    # wait for no more than one second
    q.pop(timeout: 1)
    
rescue ThreadError
    
    # you timed out
    
end

License

timeout_queue has an MIT license.