From 9a6e7c7c47bbed2fa2f2bd966912c82cd9d65f2f Mon Sep 17 00:00:00 2001 From: Yatao Li Date: Fri, 28 Jan 2022 02:33:19 +0800 Subject: [PATCH] reset throttle timer for each work item --- src/tpool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tpool.c b/src/tpool.c index e5ba3b4..970d8c3 100644 --- a/src/tpool.c +++ b/src/tpool.c @@ -173,6 +173,7 @@ static void *tpool_worker(void *arg) { if (work != NULL) { stuck_notified = 0; + throttle_ms = 0; while(!pool->stop && pool->mem_limit > 0 && _get_total_mem(pool) >= pool->mem_limit) { if (!stuck_notified && throttle_ms >= 90000) { // notify the pool that this thread is stuck.