class Andromeda::Impl::Atom

Public Class Methods

new(init_val = nil) click to toggle source
Calls superclass method
# File lib/andromeda/atom.rb, line 8
def initialize(init_val = nil)
  super init_val
end

Public Instance Methods

empty?() click to toggle source
# File lib/andromeda/atom.rb, line 12
def empty? ; value.nil? end
full?() click to toggle source
# File lib/andromeda/atom.rb, line 13
def full? ; ! value.nil? end
to_short_s() click to toggle source
# File lib/andromeda/atom.rb, line 15
def to_short_s ; "(#{To_S.short_s(value)})" end
wait_until_empty?() click to toggle source
# File lib/andromeda/atom.rb, line 32
def wait_until_empty?
  wait_until_eq nil
end
wait_until_eq(val = nil) click to toggle source
# File lib/andromeda/atom.rb, line 22
def wait_until_eq(val = nil)
  raise ArgumentError unless val.kind_of?(Fixnum)
  wait_while { |v| v != val }
end
wait_until_full?() click to toggle source
# File lib/andromeda/atom.rb, line 36
def wait_until_full?
  wait_until_ne nil
end
wait_until_ne(val = nil) click to toggle source
# File lib/andromeda/atom.rb, line 27
def wait_until_ne(val = nil)
  raise ArgumentError unless val.kind_of?(Fixnum)
  wait_while { |v| v == val }
end
wait_while(&test) click to toggle source
# File lib/andromeda/atom.rb, line 18
def wait_while(&test)
  while test.call(value) ; Thread::pass end
end
with_value() { |v ;| ... } click to toggle source
# File lib/andromeda/atom.rb, line 40
def with_value
  update { |v| yield v ; v }
end