Parent

Methods

ActiveRecord::ConnectionAdapters::FiberedMonitor::Queue

Public Class Methods

new() click to toggle source
    # File lib/active_record/fiber_patches.rb, line 15
15:         def initialize
16:           @queue = []
17:         end

Public Instance Methods

signal() click to toggle source
    # File lib/active_record/fiber_patches.rb, line 32
32:         def signal
33:           fiber = @queue.pop
34:           fiber.resume(true) if fiber
35:         end
wait(timeout) click to toggle source
    # File lib/active_record/fiber_patches.rb, line 19
19:         def wait(timeout)
20:           t = timeout || 5
21:           fiber = Fiber.current
22:           x = EM::Timer.new(t) do
23:             @queue.delete(fiber)
24:             fiber.resume(false)
25:           end
26:           @queue << fiber
27:           returning Fiber.yield do
28:             x.cancel
29:           end
30:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.