Add possibilty to execute function in thread

Now possible to send a function and arguments to a specific worker
thread for execution.

In particular, this will be used for transferring the injection of
fake hangup events into DCBs, related to a particular server, from
the monitor thread to the worker threads, thus removing the need
for locks.
This commit is contained in:
Johan Wikman
2017-02-16 15:53:00 +02:00
parent 5138032fe5
commit 7844680c7d
3 changed files with 32 additions and 14 deletions

View File

@ -938,7 +938,7 @@ void ping_workers(DCB* dcb)
{
MXS_WORKER *worker = mxs_worker_get(i);
if (mxs_worker_post_message(worker, MXS_WORKER_MSG_PING, 0, NULL))
if (mxs_worker_post_message(worker, MXS_WORKER_MSG_PING, 0, 0))
{
dcb_printf(dcb, "Posted message to worker %d.\n", i);
}