Created
September 26, 2012 20:33
-
-
Save ryanlecompte/3790424 to your computer and use it in GitHub Desktop.
an alternative resque SizedStack that doesn't suck
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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