From: "Kontra, Gergely" Date: 2002-04-10T02:14:52+09:00 Subject: Re: Threads >On Tue, 9 Apr 2002 01:45:04 +0900 matz@ruby-lang.org (Yukihiro >Matsumoto) wrote: > >> |The at_exit call doesn't work, as expected. >> >> The termination of the main thread interrupts other threads. So it's >> too late to join. Joining an interrupted thread does not "resume" the >> terminated execution. > >But Thread.exit; in the main thread should not interrupt the other >threads, should it? 'pthread_exit()' in the 'main()' function does not >interrupt other threads, what about this in ruby? > So what should I do? My problem was creating a new instant of a class, which runs in a separate thread, and the main thread waits for it before it exits. I want to handle this behaviour in the code of the class definition with a at_exit {t.join}, but it doesn't work. I'm waiting for other working solutions. Thx in advance +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ | Email: kgergely@mcl.hu, kgergely@turul.eet.bme.hu | | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 | +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+ . Magyar php mirror es magyar php dokumentacio: http://hu.php.net