Guest User

Untitled

a guest
Jan 17th, 2014
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. t1 = Thread.new do
  2. Thread.current[:foo] = 10
  3. end
  4.  
  5. t2 = Thread.new do
  6. Thread.current[:foo] = 5
  7. end
  8.  
  9. puts t1.current[:foo] + t2.current[:foo] ## Should be 15
Advertisement
Add Comment
Please, Sign In to add comment