mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Add a Ractor test case that causes MMTk to deadlock
This was a test case for Ractors discovered that causes MMTk to deadlock. There is a fix for it in https://github.com/ruby/mmtk/pull/49.
This commit is contained in:
parent
010b23a7cf
commit
3ec44a9995
@ -2350,3 +2350,23 @@ assert_equal 'ok', <<~'RUBY'
|
||||
end
|
||||
:ok
|
||||
RUBY
|
||||
|
||||
assert_equal 'ok', <<~'RUBY'
|
||||
begin
|
||||
100.times do |i|
|
||||
Ractor.new(i) do |j|
|
||||
1000.times do |i|
|
||||
"#{j}-#{i}"
|
||||
end
|
||||
Ractor.receive
|
||||
end
|
||||
pid = fork { }
|
||||
_, status = Process.waitpid2 pid
|
||||
raise unless status.success?
|
||||
end
|
||||
|
||||
:ok
|
||||
rescue NotImplementedError
|
||||
:ok
|
||||
end
|
||||
RUBY
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user