[Groonga-commit] groonga/groonga [master] Fixed missing decrement of nfthreads in h_worker().

Back to archive index

null+****@clear***** null+****@clear*****
2010年 10月 18日 (月) 14:54:42 JST


Daijiro MORI	2010-10-18 05:54:42 +0000 (Mon, 18 Oct 2010)

  New Revision: cd97c3a4aeaa4674aae5d9722885174de343916f

  Log:
    Fixed missing decrement of nfthreads in h_worker().

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+4 -1)
===================================================================
--- src/groonga.c    2010-10-06 02:30:29 +0000 (b2a2f39)
+++ src/groonga.c    2010-10-18 05:54:42 +0000 (0cffe16)
@@ -1484,7 +1484,10 @@ h_worker(void *arg)
     nfthreads++;
     while (!(msg = (grn_obj *)grn_com_queue_deque(&grn_gctx, &ctx_new))) {
       COND_WAIT(q_cond, q_mutex);
-      if (grn_gctx.stat == GRN_CTX_QUIT) { goto exit; }
+      if (grn_gctx.stat == GRN_CTX_QUIT) {
+        nfthreads--;
+        goto exit;
+      }
     }
     nfthreads--;
     MUTEX_UNLOCK(q_mutex);




Groonga-commit メーリングリストの案内
Back to archive index