class QueueDing::QDing
QDing
is basically an extension of the Array class for queuing purposes. We add QDing#next as a blocking get the next element, as well as QDing#dequeue which is an alias for Array#pop. Conversely, we add QDing#enqueue, which is just an alias for Array#unshift.
Attributes
listener_threads[RW]
These accessors are ONLY used internally, and are subject to change.
resource[RW]
These accessors are ONLY used internally, and are subject to change.
semaphore[RW]
These accessors are ONLY used internally, and are subject to change.
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/queue_ding/queue_ding.rb, line 30 def initialize super @listener_threads = Set.new @semaphore = Mutex.new @resource = ConditionVariable.new end