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

Method getErrorHandlerOrFinalTask

quantum/impl/quantum_task_impl.h:157–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157inline
158ITaskContinuation::Ptr Task::getErrorHandlerOrFinalTask()
159{
160 if ((_type == Type::ErrorHandler) || (_type == Type::Final))
161 {
162 return shared_from_this();
163 }
164 else if (_next)
165 {
166 ITaskContinuation::Ptr task = _next->getErrorHandlerOrFinalTask();
167 if ((_next->getType() != Type::ErrorHandler) && (_next->getType() != Type::Final))
168 {
169 _next->terminate();
170 _next.reset(); //release next task
171 }
172 return task;
173 }
174 return nullptr;
175}
176
177inline
178bool Task::isBlocked() const

Callers 1

handleErrorMethod · 0.80

Calls 3

resetMethod · 0.80
getTypeMethod · 0.45
terminateMethod · 0.45

Tested by

no test coverage detected