From: Joel VanderWerf Date: 2006-02-24T06:57:14+09:00 Subject: Re: Two Ruby threading questions mental@rydia.net wrote: > On the other hand, threads are not blithely terminated when some > "master" thread exits. To complete your program, you would want to > signal each thread in an appropriate fashion so that it can finish > up what it's doing and exit cleanly. Aren't other threads terminated? $ ruby -e 'Thread.new {sleep}; puts "done!"' done! But, as you say, cleanly stopping threads (perhaps using ensure blocks) is a good idea: $ ruby -e 'Thread.new {begin; sleep; ensure puts "thread done"; end}; puts "done!"' done! thread done -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407