[Groonga-commit] groonga/groonga at 5f3362a [master] groonga: fix a bug that thread_limit may not be returned

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Dec 17 19:40:45 JST 2015


Kouhei Sutou	2015-12-17 19:40:45 +0900 (Thu, 17 Dec 2015)

  New Revision: 5f3362a0cc89abd28d459979c759aca1ddbd6d8f
  https://github.com/groonga/groonga/commit/5f3362a0cc89abd28d459979c759aca1ddbd6d8f

  Message:
    groonga: fix a bug that thread_limit may not be returned
    
    It may be occurred when a thread is running when thread_limit is called.

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+3 -0)
===================================================================
--- src/groonga.c    2015-12-17 15:06:35 +0900 (1fedff1)
+++ src/groonga.c    2015-12-17 19:40:45 +0900 (25998da)
@@ -512,6 +512,9 @@ groonga_set_thread_limit(uint32_t new_limit, void *data)
     grn_bool is_reduced;
     MUTEX_LOCK_ENSURE(&grn_gctx, q_mutex);
     is_reduced = (n_running_threads <= max_n_floating_threads);
+    if (!is_reduced && n_floating_threads > 0) {
+      COND_SIGNAL(q_cond);
+    }
     MUTEX_UNLOCK(q_mutex);
     if (is_reduced) {
       break;
-------------- next part --------------
HTML����������������������������...
Descargar 



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