This patch resets a blocking request's callback before calling its
callback.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
outputCallback callback = req->getCallback ();
req->setSubmitted (false);
+ if (req->getInferMode () == NPU_INFER_BLOCKING) {
+ /* remove the internal callback for next submissions */
+ req->setCallback (nullptr);
+ }
if (!req->isStopped () && callback != nullptr)
callback ();
if (!req->isPreserved ()) {
/* the request instance is also deleted here */
removeRequest (req);
- } else if (req->getInferMode () == NPU_INFER_BLOCKING) {
- /* remove the internal callback for next submissions */
- req->setCallback (nullptr);
}
}