Skip to content

Instantly share code, notes, and snippets.

@yuroyoro
Created September 17, 2015 06:41
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 yuroyoro/600277844652c2c10155 to your computer and use it in GitHub Desktop.
Save yuroyoro/600277844652c2c10155 to your computer and use it in GitHub Desktop.
[93] pry(main)> t = Thread.new { sleep(1) }
#<Thread:0x007f3e3f1f43f0 sleep>
[94] pry(main)> t.join(0)
#<Thread:0x007f3e3f1f43f0 dead>
[95] pry(main)> t = Thread.new { sleep(1000) }
#<Thread:0x007f3e3f224b40 sleep>
[96] pry(main)> t.join(0)
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment