Skip to content

Instantly share code, notes, and snippets.

@nahi
Created Jun 8, 2010
Embed
What would you like to do?
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