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 isnt the…
Browse files Browse the repository at this point in the history
… rhread.id"
  • Loading branch information
tal committed Nov 30, 2010
1 parent 0106bab commit 6ae1916
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 6ae1916

Please sign in to comment.