This file contains 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
# Tested on DelayedJob 2.1 | |
class MyRecurringDelayedJob | |
def perform | |
# ...some slow code | |
end | |
def success(job) | |
MyRecurringDelayedJob.schedule_job(job) | |
end |
This file contains 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 'em-synchrony/thread' | |
module AWS | |
module Core | |
class SessionSigner | |
@create_mutex = EM::Synchrony::Thread::Mutex.new | |
end | |
end | |
end | |
This file contains 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' | |
# Borrowed from https://github.com/ruby/ruby/blob/ruby_1_9_3/lib/thread.rb#L140 | |
# and modified for a last in first out processing | |
# | |
# | |
class StackQueue < Queue | |
# Last in first out Queue | |
# | |
# Retrieves data from the queue. If the queue is empty, the calling thread is | |
# suspended until data is pushed onto the queue. If +non_block+ is true, the |
OlderNewer