From 2011524a2d2b5aaa76666143e4d9b41935a6ebbb Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 8 Oct 2017 21:01:49 +0200 Subject: [PATCH] Add third locking thread to test application. --- test/test.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test.cpp b/test/test.cpp index 86decd31..ad1dadea 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -65,6 +65,18 @@ void Lock2() } } +void Lock3() +{ + for(;;) + { + std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) ); + std::unique_lock lock( mutex ); + LockMark( mutex ); + ZoneScoped; + std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) ); + } +} + int main() { auto t1 = std::thread( TestFunction ); @@ -73,6 +85,7 @@ int main() auto t4 = std::thread( ScopeCheck ); auto t5 = std::thread( Lock1 ); auto t6 = std::thread( Lock2 ); + auto t7 = std::thread( Lock3 ); tracy::SetThreadName( t1, "First thread" ); tracy::SetThreadName( t2, "Second thread" ); @@ -80,6 +93,7 @@ int main() tracy::SetThreadName( t4, "Scope check" ); tracy::SetThreadName( t5, "Lock 1" ); tracy::SetThreadName( t6, "Lock 2" ); + tracy::SetThreadName( t7, "Lock 3" ); for(;;) {