diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-21 04:55:49 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-21 04:55:49 +0000 |
commit | c7b257717823607877cfdcf45d9e224541682f41 (patch) | |
tree | a34ba3f9ebcdf306c95ea9f59fc2a1e8ca222316 /test | |
parent | 34ac0ea7bfa0544cc26b943218069d35789e88fd (diff) | |
download | ruby-c7b257717823607877cfdcf45d9e224541682f41.tar.gz |
(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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_thread.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 |