aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/SendCounterPacket.cpp
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2019-11-29 13:56:33 +0000
committerFinn Williams <Finn.Williams@arm.com>2019-12-04 14:31:41 +0000
commit109c05bc985d25f513444a7caa1e54557ef0f3c0 (patch)
tree59b67e3fff31d6d23bb94b235a6463dfcf91a94d /src/profiling/SendCounterPacket.cpp
parent73ae7fa28d05babde16fa232c1d823b35c893e3e (diff)
downloadarmnn-109c05bc985d25f513444a7caa1e54557ef0f3c0.tar.gz
IVGCVSW-4118 Change the SendCounterPacket send thread to use do while
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I702fdc941e29ddcb31f54513e0a7dc642f0f4685
Diffstat (limited to 'src/profiling/SendCounterPacket.cpp')
-rw-r--r--src/profiling/SendCounterPacket.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp
index e3a9b77f41..a9846c9f06 100644
--- a/src/profiling/SendCounterPacket.cpp
+++ b/src/profiling/SendCounterPacket.cpp
@@ -974,8 +974,8 @@ void SendCounterPacket::Stop(bool rethrowSendThreadExceptions)
void SendCounterPacket::Send(IProfilingConnection& profilingConnection)
{
- // Keep the sending procedure looping until the thread is signalled to stop
- while (m_KeepRunning.load())
+ // Run once and keep the sending procedure looping until the thread is signalled to stop
+ do
{
// Check the current state of the profiling service
ProfilingState currentState = m_StateMachine.GetCurrentState();
@@ -1054,7 +1054,7 @@ void SendCounterPacket::Send(IProfilingConnection& profilingConnection)
// Send all the available packets in the buffer
FlushBuffer(profilingConnection);
- }
+ } while (m_KeepRunning.load());
// Ensure that all readable data got written to the profiling connection before the thread is stopped
// (do not notify any watcher in this case, as this is just to wrap up things before shutting down the send thread)