Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
THREADS = 10 1000.times do threads = [] THREADS.times do threads << Thread.new do sleep end end if (size = Thread.list.size) != THREADS + 1 raise "wrong! (expected #{THREADS + 1} but was #{size})" end threads.each do |t| Thread.pass until t.status == 'sleep' t.wakeup t.join end end
This paste will be private.
From the Design Piracy series on my blog: