From: wys@... (Clemens Wyss) Date: 2001-02-22T19:40:06+09:00 Subject: [ruby-talk:11300] Re: dRuby problem with Threads ptkwt@shell1.aracnet.com (Phil Tomson) wrote in : >This is a strange one - then again It's about 11:20PM so everything is >looking strange. > ...for me it's 11:20am I let the server and the client run on the same W2K-box. This is the slightly modified client code: #### client require 'drb' machine = "localhost" command = "this is the command" DRb.start_service() drbObj = DRbObject.new(nil, "druby://#{machine}:9000") def threaded(drbObj, command) thread = Thread.new() { p "start" drbObj.eval_it(command) p "end" } #thread thread.join() # Phil you *forgot* this one! end #DRb.stop_service() def single(drbObj, command) p "start" drbObj.eval_it(command) p "end" end single(drbObj, command) threaded(drbObj, command) ##### Note the thread.join()-line. Looks like windows terminates immediately (i.e. tearing down your thread -> this could be the reason for your error messages!) without the join-call. Now calling my code sometimes (not allways though) produces the following error on the client side!: "/cygdrive/d/ruby/lib/ruby/site_ruby/1.6/drb/drb.rb:189:in `open': Invalid argument - "connect(2)" (Errno::EINVAL) from E:\drb_cl.rb:12:in `join' from E:\drb_cl.rb:12:in `threaded' from E:\drb_cl.rb:22 " Looks like there is still a *slight* problem, just a different one. Clemens