From 3a0f6ce1d31eefd8af01b50f3632a64d64e8f8c1 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 8 Feb 2023 11:23:25 +0100 Subject: [PATCH] Use Thread.pass until thread.stop? to wait for thread to block [Bug #19415] It should be more reliable --- spec/ruby/fixtures/code/concurrent_require_fixture.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/ruby/fixtures/code/concurrent_require_fixture.rb b/spec/ruby/fixtures/code/concurrent_require_fixture.rb index ee85e7fb51..d4ce734183 100644 --- a/spec/ruby/fixtures/code/concurrent_require_fixture.rb +++ b/spec/ruby/fixtures/code/concurrent_require_fixture.rb @@ -1,4 +1,4 @@ object = ScratchPad.recorded thread = Thread.new { object.require(__FILE__) } -thread.wakeup unless thread.stop? +Thread.pass until thread.stop? ScratchPad.record(thread)