Skip to content

Instantly share code, notes, and snippets.

@nagachika
Created July 20, 2013 16:41
Show Gist options
  • Save nagachika/6045657 to your computer and use it in GitHub Desktop.
Save nagachika/6045657 to your computer and use it in GitHub Desktop.
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb
index 25a4608..fcf89bf 100644
--- a/test/ruby/test_fiber.rb
+++ b/test/ruby/test_fiber.rb
@@ -52,6 +52,7 @@ class TestFiber < Test::Unit::TestCase
(1..100).map{|ti|
Thread.new{
max.times{|i|
+IO.select([$stdin], nil, nil, 0) # print "" でも可。Thread.pass ではタイムアウト
Fiber.new{
@cnt += 1
}.resume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment