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:
Markus Mäkelä 2019-06-25 17:32:24 +03:00
parent 42bf95eb82
commit d15582d26d
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -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)
{
// NOTE: No logging here, this function must be signal safe.
bool rval = false;
// TODO: Fix this, it will be hit
// ss_dassert(state() != Worker::STOPPED);
if (state() != Worker::STOPPED)
{
MessageQueue::Message message(msg_id, arg1, arg2);
rval = m_pQueue->post(message);
}
return rval;
MessageQueue::Message message(msg_id, arg1, arg2);
return m_pQueue->post(message);
}
bool mxs_worker_post_message(MXS_WORKER* pWorker, uint32_t msg_id, intptr_t arg1, intptr_t arg2)