[Groonga-commit] droonga/drnbench at 910ab66 [master] Improve subscriber ready check

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jan 21 16:35:23 JST 2014


Kouhei Sutou	2014-01-21 16:35:23 +0900 (Tue, 21 Jan 2014)

  New Revision: 910ab667aff0fc3cb513f4b16fa3d65e91ece84e
  https://github.com/droonga/drnbench/commit/910ab667aff0fc3cb513f4b16fa3d65e91ece84e

  Message:
    Improve subscriber ready check
    
    Most cases will be OK with this heuristic logic.

  Modified files:
    lib/drnbench/publish-subscribe/runner.rb

  Modified: lib/drnbench/publish-subscribe/runner.rb (+6 -4)
===================================================================
--- lib/drnbench/publish-subscribe/runner.rb    2014-01-21 16:28:12 +0900 (6c0ab8d)
+++ lib/drnbench/publish-subscribe/runner.rb    2014-01-21 16:35:23 +0900 (b205196)
@@ -84,10 +84,12 @@ module Drnbench
 
       def ensure_subscribers_ready
         sleep(1)
-        do_feed(1)
-        n_subscribers.times do
-          @published_messages.pop
-          break if @published_messages.empty?
+        2.times do
+          do_feed(1)
+          n_subscribers.times do
+            @published_messages.pop
+            break if @published_messages.empty?
+          end
         end
         @published_messages.clear
       end
-------------- next part --------------
HTML����������������������������...
Download 



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