Parent

Files

Class/Module Index [+]

Quicksearch

Concurrent::Channel::WaitableList

@api Channel @!macro edge_warning

Public Class Methods

new() click to toggle source
# File lib/concurrent/channel/waitable_list.rb, line 10
def initialize
  super()
  synchronize { ns_initialize }
end

Public Instance Methods

delete(value) click to toggle source
# File lib/concurrent/channel/waitable_list.rb, line 30
def delete(value)
  synchronize { @list.delete(value) }
end
empty?() click to toggle source
# File lib/concurrent/channel/waitable_list.rb, line 19
def empty?
  synchronize { @list.empty? }
end
put(value) click to toggle source
# File lib/concurrent/channel/waitable_list.rb, line 23
def put(value)
  synchronize do
    @list << value
    ns_signal
  end
end
size() click to toggle source
# File lib/concurrent/channel/waitable_list.rb, line 15
def size
  synchronize { @list.size }
end
take() click to toggle source
# File lib/concurrent/channel/waitable_list.rb, line 34
def take
  synchronize do
    ns_wait_until { !@list.empty? }
    @list.shift
  end
end

Protected Instance Methods

ns_initialize() click to toggle source
# File lib/concurrent/channel/waitable_list.rb, line 43
def ns_initialize
  @list = []
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.