Created
November 26, 2010 12:28
-
-
Save octplane/716647 to your computer and use it in GitHub Desktop.
caller_for_all_threads fails to work in a multithread program using sleep conditions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
Thread.new do | |
sleep(15) | |
puts "dumping stacks" | |
puts caller_for_all_threads.inspect | |
puts "done." | |
end | |
while true do | |
sleep(10) | |
puts "Sleeping thread" | |
end | |
# This should dump the stacks after 15s of runtime. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment