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

ruby-changes:35586

From: akr <ko1@a...>
Date: Sun, 21 Sep 2014 13:55:56 +0900 (JST)
Subject: [ruby-changes:35586] akr:r47668 (trunk): (test_main_thread_status_at_exit) wait until the thread enter the begin clause.

akr	2014-09-21 13:55:49 +0900 (Sun, 21 Sep 2014)

  New Revision: 47668

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

  Log:
    (test_main_thread_status_at_exit) wait until the thread enter the begin clause.

  Modified files:
    trunk/test/ruby/test_thread.rb
Index: test/ruby/test_thread.rb
===================================================================
--- test/ruby/test_thread.rb	(revision 47667)
+++ test/ruby/test_thread.rb	(revision 47668)
@@ -818,8 +818,10 @@ _eom https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L818
 
   def test_main_thread_status_at_exit
     assert_in_out_err([], <<-'INPUT', ["false false aborting"], [])
+q = Queue.new
 Thread.new(Thread.current) {|mth|
   begin
+    q.push nil
     mth.run
     Thead.pass until mth.stop?
     p :mth_stopped # don't run if killed by rb_thread_terminate_all
@@ -827,6 +829,7 @@ Thread.new(Thread.current) {|mth| https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L829
     puts "#{mth.alive?} #{mth.status} #{Thread.current.status}"
   end
 }
+q.pop
     INPUT
   end
 

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

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