mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_fiber.rb: collect garbage fibers immediately.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e4f51f80d0
commit
158f3547e9
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Aug 19 17:43:44 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* test/ruby/test_fiber.rb: collect garbage fibers immediately.
|
||||
|
||||
Mon Aug 19 17:41:49 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* test/profile_test_all.rb: add `failed?' information.
|
||||
|
|
|
@ -33,16 +33,18 @@ class TestFiber < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_many_fibers
|
||||
max = 10000
|
||||
max = 10_000
|
||||
assert_equal(max, max.times{
|
||||
Fiber.new{}
|
||||
})
|
||||
GC.start # force collect created fibers
|
||||
assert_equal(max,
|
||||
max.times{|i|
|
||||
Fiber.new{
|
||||
}.resume
|
||||
}
|
||||
)
|
||||
GC.start # force collect created fibers
|
||||
end
|
||||
|
||||
def test_many_fibers_with_threads
|
||||
|
|
Loading…
Reference in a new issue