# File ruby-3.1.2/lib/drb/drb.rb, line 1236 def _execute() synchronize do @req_ev.wait_until { @status == :req } @res = yield(@req) @status = :res @res_ev.signal end end
# File ruby-3.1.2/lib/drb/drb.rb, line 1212 def alive? @thread.alive? end
# File ruby-3.1.2/lib/drb/drb.rb, line 1216 def kill @thread.kill @thread.join end
# File ruby-3.1.2/lib/drb/drb.rb, line 1221 def method_missing(msg, *arg, &blk) synchronize do @wait_ev.wait_until { @status == :wait } @req = [msg] + arg @status = :req @req_ev.broadcast @res_ev.wait_until { @status == :res } value = @res @req = @res = nil @status = :wait @wait_ev.broadcast return value end end