From c7b257717823607877cfdcf45d9e224541682f41 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 21 Sep 2014 04:55:49 +0000 Subject: (test_main_thread_status_at_exit) wait until the thread enter the begin clause. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_thread.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 369cd0a5cd..e2a181a683 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -818,8 +818,10 @@ _eom 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| puts "#{mth.alive?} #{mth.status} #{Thread.current.status}" end } +q.pop INPUT end -- cgit v1.2.3