mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix btest in ractor_test.rb that can lead timeout of the test
It could also potentially lead to an out of memory error.
This commit is contained in:
parent
c1c9deea83
commit
815eb58fce
1 changed files with 9 additions and 1 deletions
|
@ -1455,11 +1455,19 @@ assert_equal "ok", %q{
|
||||||
loop do
|
loop do
|
||||||
10_000.times.map { Object.new }
|
10_000.times.map { Object.new }
|
||||||
port << Time.now
|
port << Time.now
|
||||||
|
Ractor.receive
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
1_000.times { port.receive }
|
100.times {
|
||||||
|
workers.each do
|
||||||
|
port.receive
|
||||||
|
end
|
||||||
|
workers.each do |w|
|
||||||
|
w.send(nil)
|
||||||
|
end
|
||||||
|
}
|
||||||
"ok"
|
"ok"
|
||||||
} if !yjit_enabled? && ENV['GITHUB_WORKFLOW'] != 'ModGC' # flaky
|
} if !yjit_enabled? && ENV['GITHUB_WORKFLOW'] != 'ModGC' # flaky
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue