From: "Kontra, Gergely" Date: 2002-04-09T01:22:03+09:00 Subject: Threads Hi! I've decided to use ruby in my diploma. (have some perl experience...) I want to use threads in my program. I want to program a mobile agency. The at_exit call doesn't work, as expected. $thread=Array.new() class Agent def initialize @t=Thread.new { p "Hello" sleep 5 p "world" } at_exit{ @t.join } $thread.push(@t) end end a=Agent.new sleep .6 p "Bye-bye!" #If I add the code above, this works. for t in $thread t.join end Please help to find a more convenient solution (global variables are not convenient, are they?), I do not have much sparing time :( +-[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