i have a program i'd like to exit gracefully on certain signals. the code
spawns many threads which are never joined. however, when signaled i want to
finished and pending threads before exiting - something like
if $signaled
Thread::list.each do |t|
next if Thread::current == t
begin
t.join
rescue => e
warn{ e }
end
end
end
i'm wondering:
if i spawn threads and never join them - will Thread::list grow without
bound?
are there any issues with iterating Thread::list - since this list is
obviously changing all the time in this code (new Threads started)
cheers.
-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| When you do something, you should burn yourself completely, like a good
| bonfire, leaving no trace of yourself. --Shunryu Suzuki
===============================================================================