summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2023-02-08 11:23:25 +0100
committerJean Boussier <jean.boussier@gmail.com>2023-02-08 11:52:59 +0100
commit3a0f6ce1d31eefd8af01b50f3632a64d64e8f8c1 (patch)
treea7631f70a58ed51b2c0ece6332baa9b9f24a7a58
parent63e1769b16b4359b905ee6e6a5de3d0eab82bc0c (diff)
Use Thread.pass until thread.stop? to wait for thread to block
[Bug #19415] It should be more reliable
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7270
-rw-r--r--spec/ruby/fixtures/code/concurrent_require_fixture.rb2
1 files changed, 1 insertions, 1 deletions
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)