Skip to content

Instantly share code, notes, and snippets.

@k-tsj
Created October 2, 2011 11:58
Show Gist options
  • Save k-tsj/1257387 to your computer and use it in GitHub Desktop.
Save k-tsj/1257387 to your computer and use it in GitHub Desktop.
Similar to Bug #5386
max = 1
max.times{
Fiber.new{}
}
max = 1000
@cnt = 0
(1..100).map{|ti|
Thread.new{
max.times{|i|
Fiber.new{
@cnt += 1
}.resume
}
}
}.each{|t|
t.join
}
GC.stress = true
max = 70
@cnt = 0
(1..5).map{|ti|
Thread.new{
max.times{|i|
Fiber.new{
@cnt += 1
}.resume
}
}
}.each{|t|
t.join
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment