Skip to content

Instantly share code, notes, and snippets.

@qw3r
Created August 1, 2010 09:31
Show Gist options
  • Save qw3r/503166 to your computer and use it in GitHub Desktop.
Save qw3r/503166 to your computer and use it in GitHub Desktop.
Thread.current[:foo] = 3
p Thread.current[:foo] # prints 3
Fiber.new {
Thread.current[:foo] = 4
p Thread.current[:foo] # prints 4
}.resume
p Thread.current[:foo] # prints 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment