diff options
author | Jean byroot Boussier <jean.boussier+github@shopify.com> | 2023-02-06 23:30:42 +0100 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2023-02-08 09:50:00 +0100 |
commit | 8ce2fb9bbbaea14737c84385b1573f743a30f773 (patch) | |
tree | b1909a3f62f01b61b19369028c698bc7fbc8692e /spec/ruby/fixtures/code | |
parent | 3ab34551450c7a3a3e1ae0b24bf6b78d26129dfa (diff) |
Only emit circular dependency warning for owned thread shields
[Bug #19415]
If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.
So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7257
Diffstat (limited to 'spec/ruby/fixtures/code')
-rw-r--r-- | spec/ruby/fixtures/code/concurrent_require_fixture.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/fixtures/code/concurrent_require_fixture.rb b/spec/ruby/fixtures/code/concurrent_require_fixture.rb new file mode 100644 index 0000000000..ee85e7fb51 --- /dev/null +++ b/spec/ruby/fixtures/code/concurrent_require_fixture.rb @@ -0,0 +1,4 @@ +object = ScratchPad.recorded +thread = Thread.new { object.require(__FILE__) } +thread.wakeup unless thread.stop? +ScratchPad.record(thread) |