Skip to content

Instantly share code, notes, and snippets.

@ryanlecompte
Created September 26, 2012 20:33
Show Gist options
  • Save ryanlecompte/3790424 to your computer and use it in GitHub Desktop.
Save ryanlecompte/3790424 to your computer and use it in GitHub Desktop.
an alternative resque SizedStack that doesn't suck
require 'thread'
require 'delegate'
class SizedStack < DelegateClass(SizedQueue)
def initialize(size)
super(SizedQueue.new(size))
end
def shift
__getobj__.pop
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment