From 0252d5f97acef8f3824be0838b1717d011fb9046 Mon Sep 17 00:00:00 2001 From: Michael Butler Date: Tue, 30 Mar 2021 20:13:49 -0700 Subject: [PATCH] Add std::this_thread::yield to Burst NN polling loop Bug: N/A Test: mma Change-Id: Ibda55cfd031161614acc0c137cefb3b445548cc5 --- neuralnetworks/1.2/utils/src/ExecutionBurstUtils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neuralnetworks/1.2/utils/src/ExecutionBurstUtils.cpp b/neuralnetworks/1.2/utils/src/ExecutionBurstUtils.cpp index ca3a52c17b..1bdde1e71a 100644 --- a/neuralnetworks/1.2/utils/src/ExecutionBurstUtils.cpp +++ b/neuralnetworks/1.2/utils/src/ExecutionBurstUtils.cpp @@ -520,6 +520,8 @@ nn::Result> RequestChannelReceiver::getPacketBlocki } return packet; } + + std::this_thread::yield(); } // If we get to this point, we either stopped polling because it was taking too long or polling @@ -665,6 +667,8 @@ nn::Result> ResultChannelReceiver::getPacketBlocking } return packet; } + + std::this_thread::yield(); } // If we get to this point, we either stopped polling because it was taking too long or polling