Allow posting to stopped workers
Due to there being no distinction between a temporarily stopped worker and a permanently stopped one, we must allow posting of messages to stopped workers.
This commit is contained in:
@ -719,17 +719,8 @@ size_t Worker::execute_concurrently(Task& task)
|
|||||||
bool Worker::post_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
bool Worker::post_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
||||||
{
|
{
|
||||||
// NOTE: No logging here, this function must be signal safe.
|
// NOTE: No logging here, this function must be signal safe.
|
||||||
bool rval = false;
|
MessageQueue::Message message(msg_id, arg1, arg2);
|
||||||
// TODO: Fix this, it will be hit
|
return m_pQueue->post(message);
|
||||||
// ss_dassert(state() != Worker::STOPPED);
|
|
||||||
|
|
||||||
if (state() != Worker::STOPPED)
|
|
||||||
{
|
|
||||||
MessageQueue::Message message(msg_id, arg1, arg2);
|
|
||||||
rval = m_pQueue->post(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
return rval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mxs_worker_post_message(MXS_WORKER* pWorker, uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
bool mxs_worker_post_message(MXS_WORKER* pWorker, uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
||||||
|
|||||||
Reference in New Issue
Block a user