aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrancis Murtagh <francis.murtagh@arm.com>2019-09-05 16:29:01 +0100
committerFrancis Murtagh <francis.murtagh@arm.com>2019-09-05 16:29:01 +0100
commit0696569fbfb76b485624de24462aaf10d84f415d (patch)
tree88d400489e50f652cbbba4af286c0211247ecbe3 /src
parent868eb14c463ee76668ad75d4cd4e718a840f7be6 (diff)
downloadarmnn-0696569fbfb76b485624de24462aaf10d84f415d.tar.gz
IVGCVSW-3432 Create CaptureData Holder
* Fix race condition where result was read before execution of write Change-Id: I8961c4ce5a9000cb4d465106fe56e615beecf4dc Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Diffstat (limited to 'src')
-rw-r--r--src/profiling/test/ProfilingTests.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index c7b0bda0ff..58609528e4 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -403,10 +403,11 @@ BOOST_AUTO_TEST_CASE(CheckCaptureDataHolder)
BOOST_CHECK(captureData.GetCounterIds() == counterIds3);
std::thread thread3(CaptureDataWriteThreadImpl, std::ref(holder), capturePeriod2, std::ref(counterIds1));
- std::thread thread4(CaptureDataReadThreadImpl, std::ref(holder), std::ref(captureData));
- std::thread thread5(CaptureDataWriteThreadImpl, std::ref(holder), capturePeriod1, std::ref(counterIds2));
+ std::thread thread4(CaptureDataWriteThreadImpl, std::ref(holder), capturePeriod1, std::ref(counterIds2));
thread3.join();
thread4.join();
+
+ std::thread thread5(CaptureDataReadThreadImpl, std::ref(holder), std::ref(captureData));
thread5.join();
// Check CaptureData was written/read correctly from multiple threads