Update use of absl::MutexLock in fixture.cc
PiperOrigin-RevId: 806203271 Change-Id: Ia058d117aedb12c1014912bf5ff192fcc9782964
This commit is contained in:
committed by
Copybara-Service
parent
89152fb39e
commit
f61f89bf54
+2
-2
@@ -60,7 +60,7 @@ void default_mj_warning_handler(const char* msg) {
|
||||
} // namespace
|
||||
|
||||
MujocoErrorTestGuard::MujocoErrorTestGuard() {
|
||||
absl::MutexLock lock(&handlers_mutex);
|
||||
absl::MutexLock lock(handlers_mutex);
|
||||
if (++guard_count == 1) {
|
||||
mju_user_error = default_mj_error_handler;
|
||||
mju_user_warning = default_mj_warning_handler;
|
||||
@@ -68,7 +68,7 @@ MujocoErrorTestGuard::MujocoErrorTestGuard() {
|
||||
}
|
||||
|
||||
MujocoErrorTestGuard::~MujocoErrorTestGuard() {
|
||||
absl::MutexLock lock(&handlers_mutex);
|
||||
absl::MutexLock lock(handlers_mutex);
|
||||
if (--guard_count == 0) {
|
||||
mju_user_error = nullptr;
|
||||
mju_user_warning = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user