mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-16 01:09:55 +00:00
Use thread support helper in concurrent insert tag spec (#37112)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user