Add direct mode to Worker::execute()

Sometimes that's what you want, but primarily for completeness'
sake and it makes AUTO more sensical as it essentially chooses
beteen DIRECT and QUEUED mode.
This commit is contained in:
Johan Wikman
2019-01-31 10:04:55 +02:00
parent 556ea552aa
commit b18467e17e
2 changed files with 7 additions and 4 deletions

View File

@ -306,8 +306,9 @@ public:
enum execute_mode_t
{
EXECUTE_AUTO, /**< Execute tasks immediately */
EXECUTE_QUEUED /**< Only queue tasks for execution */
EXECUTE_DIRECT, /**< Always execute directly using the calling thread/worker. */
EXECUTE_QUEUED, /**< Always execute via the event loop using this thread/worker. */
EXECUTE_AUTO, /**< If calling thread/worker is this worker, call directly otherwise queued. */
};
struct Call