diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2017-10-08 22:01:49 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2017-10-08 22:01:49 +0300 |
commit | 2011524a2d2b5aaa76666143e4d9b41935a6ebbb (patch) | |
tree | 771f5a3a0bbe96372d23d01567af3dd2145726cc /test | |
parent | fbe7e59319eeafd1e3557ff1a15b57e9fdd33da0 (diff) |
Add third locking thread to test application.
Diffstat (limited to 'test')
-rw-r--r-- | test/test.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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<LockableBase( std::mutex )> 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(;;) { |