summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-21 04:55:49 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-21 04:55:49 +0000
commitc7b257717823607877cfdcf45d9e224541682f41 (patch)
treea34ba3f9ebcdf306c95ea9f59fc2a1e8ca222316
parent34ac0ea7bfa0544cc26b943218069d35789e88fd (diff)
(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
-rw-r--r--test/ruby/test_thread.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 369cd0a..e2a181a 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