MXS-2002 Make Worker excecution mode explicit
This is the first step in some cleanup of the Worker interface. The execution mode must now be explicitly specified, but that is just a temporary step. Further down the road, _posting_ will *always* mean via the message loop while _executing_ will optionally and by default mean direct execution if the calling thread is that of the worker.
This commit is contained in:
@ -516,10 +516,10 @@ bool Worker::post(GenericFunction func, Semaphore* pSem, execute_mode_t mode)
|
||||
return rval;
|
||||
}
|
||||
|
||||
bool Worker::execute(GenericFunction func)
|
||||
bool Worker::execute(GenericFunction func, execute_mode_t mode)
|
||||
{
|
||||
Semaphore sem;
|
||||
return post(func, &sem, EXECUTE_AUTO) && sem.wait();
|
||||
return post(func, &sem, mode) && sem.wait();
|
||||
}
|
||||
|
||||
bool Worker::post_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
||||
|
Reference in New Issue
Block a user