diff options
-rw-r--r-- | src/Async.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Async.cc b/src/Async.cc index 18c8ef1..8db4f1b 100644 --- a/src/Async.cc +++ b/src/Async.cc @@ -33,10 +33,14 @@ void Balau::AsyncManager::queueOp(AsyncOperation * op) { op->m_idleReadyCallback = tls->idleReadyCallback; op->m_idleReadyParam = tls->idleReadyParam; } - if (op->needsMainQueue()) + if (op->needsMainQueue()) { m_queue.push(op); - else + } else if (op->needsFinishWorker()) { m_finished.push(op); + } else { + op->run(); + op->finalize(); + } } void Balau::AsyncManager::checkIdle() { @@ -120,6 +124,8 @@ void * Balau::AsyncFinishWorker::proc() { Printer::elog(E_ASYNC, "AsyncFinishWorker got a stopper operation"); m_stopping = true; } + if (!op->needsMainQueue()) + op->run(); op->finalize(); } |