summaryrefslogtreecommitdiff
path: root/test/ruby/test_thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r--test/ruby/test_thread.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 47a8e94c07..b2d8e73693 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -1664,39 +1664,4 @@ q.pop
assert_operator elapsed, :>=, 0.1, "sub-millisecond sleeps should not return immediately"
end;
end
-
- # [Bug #21840]
- def test_mutex_owner_doesnt_starve_waiters
- assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
- begin;
- require "tempfile"
- temp = Tempfile.new("temp")
- m = Mutex.new
-
- def fib(n)
- return n if n <= 1
- fib(n - 1) + fib(n - 2)
- end
-
- t1_running = false
- Thread.new do
- t1_running = true
- loop do
- fib(20)
- m.synchronize do
- File.open(temp.path) { } # reset timeslice due to blocking operation
- end
- end
- end
-
- loop until t1_running
-
- 3.times.map do
- Thread.new do
- m.synchronize do
- end
- end
- end.each(&:join)
- end;
- end
end