1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use a proper mutex for autoloading features. (#5788)

Object#autoload implements a custom per-thread "mutex" for blocking
threads waiting on autoloading a feature. This causes problems when used
with the fiber scheduler. We swap the implementation to use a Ruby mutex
which is fiber aware.
This commit is contained in:
Samuel Williams 2022-05-08 10:22:58 +12:00 committed by GitHub
parent 679b6e43c7
commit fd6cef79f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-05-08 07:23:27 +09:00
Merged-By: ioquatix <samuel@codeotaku.com>
3 changed files with 124 additions and 135 deletions

3
test/fiber/autoload.rb Normal file
View file

@ -0,0 +1,3 @@
sleep 0.01
module TestFiberSchedulerAutoload
end