summaryrefslogtreecommitdiff
path: root/sql/sql_manager.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-01-18 18:01:17 +0100
committerSergei Golubchik <serg@mariadb.org>2021-01-24 11:35:55 +0100
commit990eb09333dcb2147ccffa9633c1b2bd246aea65 (patch)
treec5e64a7c8699cd18540aa7c0efff40fd713f3b41 /sql/sql_manager.h
parent4a7e62296a295758b128d20f6bbb0973b94c5193 (diff)
downloadmariadb-git-990eb09333dcb2147ccffa9633c1b2bd246aea65.tar.gz
cleanup: fix and generalize handle_manager thread
* provide an argument to the callback * don't ignore a callback request if it's already present in the queue * initialize mutex/cond/in_use flag before starting the thread, in case the first callback queueing request arrives before handle_manager had time to initialize * set/check abort_manager under a mutex, otherwise handle_manager thread might destroy LOCK_manager before stop_handle_manager released it * signal COND on queueing a callback, stop cond_wait on callback request * always start the thread, even if flush_time is 0 * but keep the old behavior in embedded (no replication, no galera) * style cleanups (e.g. remove volatile for a variable protected by a mutex)
Diffstat (limited to 'sql/sql_manager.h')
-rw-r--r--sql/sql_manager.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_manager.h b/sql/sql_manager.h
index 9c6c84450ed..f97d4a2cfc5 100644
--- a/sql/sql_manager.h
+++ b/sql/sql_manager.h
@@ -18,6 +18,6 @@
void start_handle_manager();
void stop_handle_manager();
-bool mysql_manager_submit(void (*action)());
+bool mysql_manager_submit(void (*action)(void *), void *data);
#endif /* SQL_MANAGER_INCLUDED */