[Groonga-commit] droonga/droonga-engine at 66f9a12 [master] Revert "Call given block directly instead of yield."

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Sep 5 17:50:54 JST 2014


YUKI Hiroshi	2014-09-05 17:50:54 +0900 (Fri, 05 Sep 2014)

  New Revision: 66f9a1239809f30c37cac350b56d191ef340d8b7
  https://github.com/droonga/droonga-engine/commit/66f9a1239809f30c37cac350b56d191ef340d8b7

  Message:
    Revert "Call given block directly instead of yield."
    
    This reverts commit d4e2966e0c3cce66afabd30a1ac70d29d38c83dc.
    To step back to the position before I introduce changes to make shutdown processes "yieldable".

  Modified files:
    lib/droonga/worker_process_agent.rb

  Modified: lib/droonga/worker_process_agent.rb (+5 -3)
===================================================================
--- lib/droonga/worker_process_agent.rb    2014-09-05 17:49:14 +0900 (d9eda53)
+++ lib/droonga/worker_process_agent.rb    2014-09-05 17:50:54 +0900 (6c5f0aa)
@@ -39,14 +39,14 @@ module Droonga
       logger.trace("start: done")
     end
 
-    def stop(&block)
+    def stop
       logger.trace("stop: start")
 
       n_rest_closes = 2
       on_finish = lambda do
         n_rest_closes -= 1
         if n_rest_closes.zero?
-          block.call if block.given?
+          yield
           logger.trace("stop: done")
         end
       end
@@ -56,7 +56,9 @@ module Droonga
         output.write(Messages::FINISH)
         output.on_write_complete do
           output.close
-          on_finish.call
+          on_finish.call do
+            yield
+          end
         end
       else
         on_finish.call
-------------- next part --------------
HTML����������������������������...
Download 



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