Class: ActiveRecord::ConnectionAdapters::FiberedMonitor::Queue
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::FiberedMonitor::Queue
- Defined in:
- lib/active_record/patches.rb
Instance Method Summary collapse
-
#initialize ⇒ Queue
constructor
A new instance of Queue.
- #signal ⇒ Object
- #wait(timeout) ⇒ Object
Constructor Details
#initialize ⇒ Queue
Returns a new instance of Queue.
13 14 15 |
# File 'lib/active_record/patches.rb', line 13 def initialize @queue = [] end |
Instance Method Details
#signal ⇒ Object
30 31 32 33 |
# File 'lib/active_record/patches.rb', line 30 def signal fiber = @queue.pop fiber.resume(true) if fiber end |