MCPcopy Create free account
hub / github.com/bloomberg/quantum / handleSuccess

Method handleSuccess

quantum/impl/quantum_task_queue_impl.h:451–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451inline
452bool TaskQueue::handleSuccess(const WorkItem& workItem)
453{
454 ITaskContinuation::Ptr nextTask;
455 //check if there's another task scheduled to run after this one
456 nextTask = workItem._task->getNextTask();
457 if (nextTask && (nextTask->getType() == ITask::Type::ErrorHandler))
458 {
459 //skip error handler since we don't have any errors
460 nextTask->terminate(); //invalidate the error handler
461 nextTask = nextTask->getNextTask();
462 }
463 //queue next task and de-queue current one
464 enqueue(nextTask);
465 doDequeue(_isIdle, workItem._iter);
466 //Coroutine ended normally with "return 0" statement
467 _stats.incCompletedCount();
468 return true;
469}
470
471inline
472bool TaskQueue::handleError(const WorkItem& workItem)

Callers

nothing calls this directly

Calls 4

getNextTaskMethod · 0.80
incCompletedCountMethod · 0.80
getTypeMethod · 0.45
terminateMethod · 0.45

Tested by

no test coverage detected