From: Nate Smith Date: 2006-03-21T10:11:42+09:00 Subject: Keeping a thread alive Hello everyone, I'm trying to keep a thread alive after exiting a method. The pseudo- code is as follows: class A def start @mainThread = Thread.new { oneThread = Thread.new { # do some stuff } twoThread = Thread.new { # do some other stuff } oneThread.join twoThread.join } end end aObject = A.new aObject.start The problem is that since there is no :join call on @mainThread, it is killed (and hence oneThread, and twoThread as well) once control ends in :start. This is perfectly valid, of course, but I would like @mainThread to stay alive after control in :start ends. Is there any way to do this? Thanks Nate