summaryrefslogtreecommitdiff
path: root/sql/scheduler.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2013-02-19 20:44:33 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2013-02-19 20:44:33 +0100
commit41013f16a05f45524a01e40cc48bc8e6f9904f55 (patch)
tree0e53be99ee534810070ae70acd0daad7e5dbee59 /sql/scheduler.cc
parent35bc8f9f4353b64da215e52ff6f1612a8ce66f43 (diff)
downloadmariadb-git-41013f16a05f45524a01e40cc48bc8e6f9904f55.tar.gz
MDEV-156 Threadpool - add thd_wait_begin/thd_wait_end to the network IO functions
Diffstat (limited to 'sql/scheduler.cc')
-rw-r--r--sql/scheduler.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/scheduler.cc b/sql/scheduler.cc
index 54653557b16..7f250158ccb 100644
--- a/sql/scheduler.cc
+++ b/sql/scheduler.cc
@@ -27,6 +27,7 @@
#include "mysqld.h"
#include "sql_class.h"
#include "sql_callback.h"
+#include <violite.h>
/*
End connection, in case when we are using 'no-threads'
@@ -61,6 +62,15 @@ static void scheduler_wait_sync_begin(void) {
static void scheduler_wait_sync_end(void) {
thd_wait_end(NULL);
}
+
+static void scheduler_wait_net_begin(void) {
+ thd_wait_begin(NULL, THD_WAIT_NET);
+}
+
+static void scheduler_wait_net_end(void) {
+ thd_wait_end(NULL);
+}
+
};
/**@}*/
@@ -76,6 +86,9 @@ void scheduler_init() {
scheduler_wait_lock_end);
thr_set_sync_wait_callback(scheduler_wait_sync_begin,
scheduler_wait_sync_end);
+
+ vio_set_wait_callback(scheduler_wait_net_begin,
+ scheduler_wait_net_end);
}