[前][次][番号順一覧][スレッド一覧]

ruby-changes:30541

From: ko1 <ko1@a...>
Date: Mon, 19 Aug 2013 17:44:56 +0900 (JST)
Subject: [ruby-changes:30541] ko1:r42620 (trunk): * test/ruby/test_fiber.rb: collect garbage fibers immediately.

ko1	2013-08-19 17:44:50 +0900 (Mon, 19 Aug 2013)

  New Revision: 42620

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42620

  Log:
    * test/ruby/test_fiber.rb: collect garbage fibers immediately.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_fiber.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42619)
+++ ChangeLog	(revision 42620)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Aug 19 17:43:44 2013  Koichi Sasada  <ko1@a...>
+
+	* test/ruby/test_fiber.rb: collect garbage fibers immediately.
+
 Mon Aug 19 17:41:49 2013  Koichi Sasada  <ko1@a...>
 
 	* test/profile_test_all.rb: add `failed?' information.
Index: test/ruby/test_fiber.rb
===================================================================
--- test/ruby/test_fiber.rb	(revision 42619)
+++ test/ruby/test_fiber.rb	(revision 42620)
@@ -33,16 +33,18 @@ class TestFiber < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_fiber.rb#L33
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]