From 0dfee5a37a0339a0cc2fad9998976f3b3d44f0a0 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 21 Jul 2017 03:24:29 -0700 Subject: Eliminate the separate AIO wake callback, making nni_aio_wait block for any AIO completion. --- src/core/taskq.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/taskq.c') diff --git a/src/core/taskq.c b/src/core/taskq.c index cf722596..33116ec9 100644 --- a/src/core/taskq.c +++ b/src/core/taskq.c @@ -145,6 +145,11 @@ nni_task_dispatch(nni_task *task) { nni_taskq *tq = task->task_tq; + // If there is no callback to perform, then do nothing! + // The user will be none the wiser. + if (task->task_cb == NULL) { + return; + } nni_mtx_lock(&tq->tq_mtx); // It might already be scheduled... if so don't redo it. if (!nni_list_active(&tq->tq_tasks, task)) { -- cgit v1.2.3-70-g09d2