Mark locks in test application.

This commit is contained in:
Bartosz Taudul 2017-10-06 18:15:00 +02:00
parent 6488ba6e0f
commit ad28bdf85d

View File

@ -47,6 +47,7 @@ void Lock1()
{ {
std::this_thread::sleep_for( std::chrono::milliseconds( 4 ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 4 ) );
std::lock_guard<LockableBase( std::mutex )> lock( mutex ); std::lock_guard<LockableBase( std::mutex )> lock( mutex );
LockMark( mutex );
ZoneScoped; ZoneScoped;
std::this_thread::sleep_for( std::chrono::milliseconds( 4 ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 4 ) );
} }
@ -58,6 +59,7 @@ void Lock2()
{ {
std::this_thread::sleep_for( std::chrono::milliseconds( 3 ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 3 ) );
std::unique_lock<LockableBase( std::mutex )> lock( mutex ); std::unique_lock<LockableBase( std::mutex )> lock( mutex );
LockMark( mutex );
ZoneScoped; ZoneScoped;
std::this_thread::sleep_for( std::chrono::milliseconds( 5 ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 5 ) );
} }