Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit b5d86dc

Browse files
committed
Mirror services execution is now threaded
1 parent 44aab4d commit b5d86dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/active_storage/service/mirror_service.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def primary_service
2626
end
2727

2828
def perform_across_services(method, *args)
29-
# FIXME: Convert to be threaded
30-
services.collect do |service|
31-
service.public_send method, *args
29+
threads = services.collect do |service|
30+
Thread.new { service.public_send method, *args }
3231
end
32+
threads.collect { |thread| thread.join }
3333
end
3434
end

0 commit comments

Comments
 (0)