Use shared lockable wrappers in test.

This commit is contained in:
Bartosz Taudul 2017-12-10 21:52:26 +01:00
parent 782231b048
commit 06fcb24440

View File

@ -139,14 +139,14 @@ void DepthTest()
}
}
static std::shared_mutex sharedMutex;
static TracySharedLockable( std::shared_mutex, sharedMutex );
void SharedRead()
{
for(;;)
{
std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
std::shared_lock<std::shared_mutex> lock( sharedMutex );
std::shared_lock<SharedLockableBase( std::shared_mutex )> lock( sharedMutex );
std::this_thread::sleep_for( std::chrono::milliseconds( 4 ) );
}
}
@ -156,7 +156,7 @@ void SharedWrite()
for(;;)
{
std::this_thread::sleep_for( std::chrono::milliseconds( 4 ) );
std::unique_lock<std::shared_mutex> lock( sharedMutex );
std::unique_lock<SharedLockableBase( std::shared_mutex )> lock( sharedMutex );
std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
}
}