From f96cf93aa689fd319637c78cd7e5522e35557490 Mon Sep 17 00:00:00 2001 From: kanoi Date: Wed, 31 Aug 2016 09:10:55 +1000 Subject: [PATCH] ckdb - prioritise workinfo processing --- src/ckdb.c | 6 +++++- src/ckdb.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index 3f4dc56c..c9219873 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -4557,7 +4557,11 @@ static void *breaker(void *arg) pthread_cond_signal(&process_reload_waitcond); mutex_unlock(&process_reload_waitlock); } else { - k_add_tail(cmd_done_breakqueue_store, bq_item); + // Prioritise workinfo processing + if (bq->cmdnum == CMD_WORKINFO) + k_add_head(cmd_done_breakqueue_store, bq_item); + else + k_add_tail(cmd_done_breakqueue_store, bq_item); mutex_lock(&process_socket_waitlock); process_socket_signals++; pthread_cond_signal(&process_socket_waitcond); diff --git a/src/ckdb.h b/src/ckdb.h index 48d4334d..0ec8ecc4 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -58,7 +58,7 @@ #define DB_VLOCK "1" #define DB_VERSION "1.0.7" -#define CKDB_VERSION DB_VERSION"-2.437" +#define CKDB_VERSION DB_VERSION"-2.438" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__