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

ruby-changes:71305

From: Benoit <ko1@a...>
Date: Wed, 2 Mar 2022 00:59:54 +0900 (JST)
Subject: [ruby-changes:71305] a0e3da9ecc (master): Fix race in TestThread#test_thread_status_in_trap

https://git.ruby-lang.org/ruby.git/commit/?id=a0e3da9ecc

From a0e3da9ecc3ff46c27eae34091651929790e28dc Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Tue, 1 Mar 2022 16:49:23 +0100
Subject: Fix race in TestThread#test_thread_status_in_trap

* If the sleep is not enough to run the rest of the logic the process
  would be exited early, e.g., before the signal handler can run.
---
 test/ruby/test_thread.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 2c91eca583..e80ca16022 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -1068,7 +1068,7 @@ q.pop https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L1068
         puts mth.status
         Process.kill(:INT, $$)
       }
-      sleep 0.1
+      sleep
     INPUT
   end
 
-- 
cgit v1.2.1


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

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