Project

General

Profile

Bug #9163 ยป rinda.ring.rb.announce_local_ring_server.patch

drbrain (Eric Hodel), 11/27/2013 02:37 PM

View differences:

lib/rinda/ring.rb (working copy)
# address of the local TupleSpace.
def do_reply
tuple = @ts.take([:lookup_ring, DRbObject], @renewer)
tuple = @ts.take([:lookup_ring, nil], @renewer)
Thread.new { tuple[1].call(@ts) rescue nil}
rescue
end
test/rinda/test_rinda.rb (working copy)
@rs.shutdown
end
def test_do_reply
called = nil
callback = proc { |ts|
called = ts
}
callback = DRb::DRbObject.new callback
@ts.write [:lookup_ring, callback]
@rs.do_reply
Thread.pass until called
assert_same @ts, called
end
def test_do_reply_local
called = nil
callback = proc { |ts|
called = ts
}
@ts.write [:lookup_ring, callback]
@rs.do_reply
Thread.pass until called
assert_same @ts, called
end
def test_make_socket_unicast
v4 = @rs.make_socket('127.0.0.1')
    (1-1/1)