From: "Ara.T.Howard" Date: 2004-04-28T08:14:04+09:00 Subject: Re: $stdin, thread blocking and DRb (for lack of a better subject :) On Tue, 27 Apr 2004, Ken Hilton wrote: > Thanks Ara, > > I can't try your program due to not having "readline.rb" I that part of the > Ruby 1.8.1 distribution? oops.. should have been 'rescue LoadError' that way it'll work w/o readline.... > If not could you provide it to me? As for how (I believe) I know that my > threads are not running, they log events at a very fine level to a shared > log file (mutex protected.) As soon as the command shell calls $stdin.gets > the threads stop logging and the DRb thread stops responding to remote > method calls (they seem to be queued.) As soon as I press [Enter] on my > command shell and gets() returns the log file gets updated, my POP3 mail > fetch completes and DRb responds immediately. And, if I simply comment out > the gets() call and add a hard coded command string > that is processed repeatedly, all of the threads run in parallel. Hmmm.... sounds tough... - does the stdin read have the mutex while trying to gets? -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 | URL :: http://www.ngdc.noaa.gov/stp/ | TRY :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done ===============================================================================