| 449 | } |
| 450 | |
| 451 | inline |
| 452 | bool 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 | |
| 471 | inline |
| 472 | bool TaskQueue::handleError(const WorkItem& workItem) |
nothing calls this directly
no test coverage detected