Use thread support helper in concurrent insert tag spec (#37112)

This commit is contained in:
Matt Jankowski
2025-12-04 04:11:53 -05:00
committed by GitHub
parent d063af2594
commit 832d8c7397
2 changed files with 4 additions and 10 deletions

View File

@@ -6,10 +6,10 @@ module ThreadingHelpers
def multi_threaded_execution(thread_count)
barrier = Concurrent::CyclicBarrier.new(thread_count)
threads = Array.new(thread_count) do
threads = Array.new(thread_count) do |index|
Thread.new do
barrier.wait
yield
yield(index)
end
end