Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
safer dead thread removal, works in the circumstance the key isn't th…
Browse files Browse the repository at this point in the history
…e thread.id
  • Loading branch information
tal authored and flippingbits committed Dec 1, 2010
1 parent 0106bab commit e7e742d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/titan/thread.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def save_threads
# Removes threads that are not living anymore
#
def remove_dead_threads
@@threads.each_value { |thread| @@threads.delete(thread.id) unless thread.alive? }
@@threads.delete_if { |thread_id,thread| !thread.alive? }
end
end
end
Expand Down

0 comments on commit e7e742d

Please sign in to comment.