Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- producer = Thread.new {
- c = 0
- while true do
- 5.times do # enqueue five elements per iteration
- q << c
- c += 1
- end
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement