[Groonga-commit] groonga/groonga at d1734ff [master] groonga server: ensure stopping by C-c

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Dec 8 18:26:01 JST 2017


Kouhei Sutou	2017-12-08 18:26:01 +0900 (Fri, 08 Dec 2017)

  New Revision: d1734ffeac18a3a31f6b67bebce654346a3e8795
  https://github.com/groonga/groonga/commit/d1734ffeac18a3a31f6b67bebce654346a3e8795

  Message:
    groonga server: ensure stopping by C-c
    
    Floating threads aren't finished without this.

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+4 -0)
===================================================================
--- src/groonga.c    2017-12-07 16:50:02 +0900 (c1b5c0d68)
+++ src/groonga.c    2017-12-08 18:26:01 +0900 (a5ff62ea7)
@@ -931,7 +931,11 @@ run_server_loop(grn_ctx *ctx, grn_com_event *ev)
     /* todo : log stat */
   }
   for (;;) {
+    int i;
     MUTEX_LOCK_ENSURE(ctx, q_mutex);
+    for (i = 0; i < n_floating_threads; i++) {
+      COND_SIGNAL(q_cond);
+    }
     if (n_running_threads == n_floating_threads) { break; }
     MUTEX_UNLOCK(q_mutex);
     grn_nanosleep(1000000);
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171208/ffcfca66/attachment.htm 



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