Open
Description
Hi!
The suite of Zeitwerk has this test to check autoloading blocks context switching (autoloading is thread-safe):
test "constant definition is synchronized" do
files = [["m.rb", <<-EOS]]
module M
sleep 0.5
def self.works?
true
end
end
EOS
with_setup(files) do
t = Thread.new { M }
assert M.works?
t.join
end
end
It has passed regularly for a long time, but it started to fail in a flaky way both in truffleruby
and in truffleruby-head
. See for example this build, or this build.
Does it ring a bell?