Created
June 29, 2012 00:27
-
-
Save charleseff/3014927 to your computer and use it in GitHub Desktop.
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
[31] pry(main)> @count = 1 | |
=> 1 | |
[32] pry(main)> t = Thread.new {begin; loop{sleep 1}; ensure @count +=1; end} | |
=> #<Thread:0x00000102e47ca0 run> | |
[33] pry(main)> t.kill | |
=> #<Thread:0x00000102e47ca0 aborting> | |
[34] pry(main)> @count | |
=> 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment