[Groonga-commit] droonga/droonga-engine at 0221b06 [master] Shutdown slices parallel

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Apr 21 16:03:47 JST 2014


Kouhei Sutou	2014-04-21 16:03:47 +0900 (Mon, 21 Apr 2014)

  New Revision: 0221b060144f1c60eedc2fc1d1789b0cff369a57
  https://github.com/droonga/droonga-engine/commit/0221b060144f1c60eedc2fc1d1789b0cff369a57

  Message:
    Shutdown slices parallel

  Modified files:
    lib/droonga/farm.rb

  Modified: lib/droonga/farm.rb (+5 -1)
===================================================================
--- lib/droonga/farm.rb    2014-04-21 15:56:03 +0900 (b65e0cc)
+++ lib/droonga/farm.rb    2014-04-21 16:03:47 +0900 (6f82c3d)
@@ -42,9 +42,13 @@ module Droonga
     end
 
     def shutdown
+      threads = []
       @slices.each_value do |slice|
-        slice.shutdown
+        threads << Thread.new do
+          slice.shutdown
+        end
       end
+      threads.each(&:join)
     end
 
     def process(slice_name, message)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index