[Groonga-commit] groonga/groonga at 0ec1cf7 [master] Quit ctx when the ctx is canceled

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Mar 16 23:25:32 JST 2016


Kouhei Sutou	2016-03-16 23:25:32 +0900 (Wed, 16 Mar 2016)

  New Revision: 0ec1cf71d597077af257d2025ded9b64a7273ca3
  https://github.com/groonga/groonga/commit/0ec1cf71d597077af257d2025ded9b64a7273ca3

  Message:
    Quit ctx when the ctx is canceled

  Modified files:
    lib/request_canceler.c
    src/groonga.c

  Modified: lib/request_canceler.c (+1 -0)
===================================================================
--- lib/request_canceler.c    2016-03-16 23:25:09 +0900 (d95705c)
+++ lib/request_canceler.c    2016-03-16 23:25:32 +0900 (1b4ea51)
@@ -96,6 +96,7 @@ grn_request_canceler_cancel_entry(grn_request_canceler_entry *entry)
 {
   if (entry->ctx->rc == GRN_SUCCESS) {
     entry->ctx->rc = GRN_CANCEL;
+    entry->ctx->stat = GRN_CTX_QUIT;
     return GRN_TRUE;
   } else {
     return GRN_FALSE;

  Modified: src/groonga.c (+1 -0)
===================================================================
--- src/groonga.c    2016-03-16 23:25:09 +0900 (df9a067)
+++ src/groonga.c    2016-03-16 23:25:32 +0900 (28e74cb)
@@ -2135,6 +2135,7 @@ h_worker(void *arg)
   GRN_LOG(&grn_gctx, GRN_LOG_NOTICE, "thread start (%d/%d)",
           n_floating_threads, n_running_threads);
   while (n_running_threads <= max_n_floating_threads &&
+         ctx->stat != GRN_CTX_QUIT &&
          grn_gctx.stat != GRN_CTX_QUIT) {
     grn_obj *msg;
     n_floating_threads++;
-------------- next part --------------
HTML����������������������������...
下載 



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