summaryrefslogtreecommitdiff
path: root/sql/threadpool_unix.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-12-29 21:11:06 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2011-12-29 21:11:06 +0100
commitbb0a0c52a65ce3a0621fcfc133d724b0485bb5c3 (patch)
tree37d6b5c0aa6a5b47dc03c97768b1c1566235e385 /sql/threadpool_unix.cc
parent539a7ebe1038560c8de1d521120058907f2604bf (diff)
downloadmariadb-git-bb0a0c52a65ce3a0621fcfc133d724b0485bb5c3.tar.gz
Make threadpool_stall_limit variable really dynamic
Diffstat (limited to 'sql/threadpool_unix.cc')
-rw-r--r--sql/threadpool_unix.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc
index 32847e91a32..d9eb90532af 100644
--- a/sql/threadpool_unix.cc
+++ b/sql/threadpool_unix.cc
@@ -1324,6 +1324,7 @@ bool tp_init()
DBUG_RETURN(0);
}
+
void tp_end()
{
DBUG_ENTER("tp_end");
@@ -1365,3 +1366,13 @@ int tp_set_threadpool_size(uint size)
group_count= size;
return 0;
}
+
+void tp_set_threadpool_stall_limit(uint limit)
+{
+ if (!started)
+ return;
+ mysql_mutex_lock(&(pool_timer.mutex));
+ pool_timer.tick_interval= limit;
+ mysql_cond_signal(&(pool_timer.cond));
+ mysql_mutex_unlock(&(pool_timer.mutex));
+}