Skip to content

Instantly share code, notes, and snippets.

@dwaite
Created May 4, 2011 20:18
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 dwaite/955946 to your computer and use it in GitHub Desktop.
Save dwaite/955946 to your computer and use it in GitHub Desktop.
ruby-1.9.2-p180 :008 > z = Fiber.new{Thread.current}.resume
=> #<Thread:0x00000100887678 run>
ruby-1.9.2-p180 :009 > Thread.current
=> #<Thread:0x00000100887678 run>
ruby-1.9.2-p180 :010 > z = Fiber.new{Thread.current.object_id}.resume
=> 2151955260
ruby-1.9.2-p180 :011 > Thread.current.object_id
=> 2151955260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment