From 140ded012addc863dabbc4c1eb23a7e6cf0f3319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Wed, 24 Jan 2024 03:38:29 +0100 Subject: [PATCH] querry operation finished state in loop which could be more efficient --- offloading-cacher/cache.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/offloading-cacher/cache.hpp b/offloading-cacher/cache.hpp index e683b26..7db8739 100644 --- a/offloading-cacher/cache.hpp +++ b/offloading-cacher/cache.hpp @@ -695,6 +695,7 @@ inline void dsacache::CacheData::WaitOnCompletion() { bool error = false; for (auto& handler : *local_handlers) { + while (!handler.is_finished()) sched_yield(); auto result = handler.get(); if (result.status != dml::status_code::ok) {