Skip to content

Instantly share code, notes, and snippets.

@kyrylo

kyrylo/thr.rb Secret

Created September 27, 2019 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyrylo/b70862a458345573f44dbfa58214dce3 to your computer and use it in GitHub Desktop.
Save kyrylo/b70862a458345573f44dbfa58214dce3 to your computer and use it in GitHub Desktop.
thr1 = Thread.new { Thread.stop }
thr2 = Thread.new { sleep }
p thr1 #=> #<Thread:0x00007fb4d7859ad8@(pry):1 sleep_forever>
p thr2 #=> #<Thread:0x00007fb4d7bb2ab8@(pry):2 sleep>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment