diff options
author | Jean Boussier <byroot@ruby-lang.org> | 2023-02-08 11:23:25 +0100 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2023-02-08 11:52:59 +0100 |
commit | 3a0f6ce1d31eefd8af01b50f3632a64d64e8f8c1 (patch) | |
tree | a7631f70a58ed51b2c0ece6332baa9b9f24a7a58 /spec | |
parent | 63e1769b16b4359b905ee6e6a5de3d0eab82bc0c (diff) | |
download | ruby-3a0f6ce1d31eefd8af01b50f3632a64d64e8f8c1.tar.gz |
Use Thread.pass until thread.stop? to wait for thread to block
[Bug #19415]
It should be more reliable
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/fixtures/code/concurrent_require_fixture.rb | 2 |
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) |