Created
June 8, 2010 14:09
-
-
Save nahi/430066 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'thread' | |
q = Queue.new | |
t1 = Thread.new { | |
p [:t1, q.pop] | |
q.push(:t1) | |
} | |
q.push(:main) | |
p [:main, q.pop] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment