Commit f711b660 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

Remove TSAN code that caused an assert

Summary: Remove TSAN code that caused an assert

Reviewed By: andriigrynenko

Differential Revision: D22925613

fbshipit-source-id: 67cf634ccd29453a6e399951b8bf541a2c471104
parent 52264b66
......@@ -75,27 +75,8 @@ class ObserverManager {
SharedMutexReadPriority::ReadHolder rh(instance.versionMutex_);
// TSAN assumes that the thread that locks the mutex must
// be the one that unlocks it. However, we are passing ownership of
// the read lock into the lambda, and the thread that performs the async
// work will be the one that unlocks it. To avoid noise with TSAN,
// annotate that the thread has released the mutex, and then annotate
// the async thread as acquiring the mutex.
annotate_rwlock_released(
&instance.versionMutex_,
annotate_rwlock_level::rdlock,
__FILE__,
__LINE__);
updatesManager->scheduleCurrent(
[core = std::move(core), &instance, rh = std::move(rh)]() {
// Make TSAN know that the current thread owns the read lock now.
annotate_rwlock_acquired(
&instance.versionMutex_,
annotate_rwlock_level::rdlock,
__FILE__,
__LINE__);
core->refresh(instance.version_);
});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment