mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
cebde437a1
* Revert "Revert "Guard the service protocol's global handlers list with a reader/writer lock (#6888) #6895" (#6899)"
This reverts commit b6e93759fa and applies fix for tests on Windows.
* Reland guard the service protocol's global handlers list with a reader/writer lock.
* Remove blank line
30 lines
566 B
C++
30 lines
566 B
C++
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "flutter/fml/synchronization/shared_mutex_std.h"
|
|
|
|
namespace fml {
|
|
|
|
SharedMutex* SharedMutex::Create() {
|
|
return new SharedMutexStd();
|
|
}
|
|
|
|
void SharedMutexStd::Lock() {
|
|
mutex_.lock();
|
|
}
|
|
|
|
void SharedMutexStd::LockShared() {
|
|
mutex_.lock_shared();
|
|
}
|
|
|
|
void SharedMutexStd::Unlock() {
|
|
mutex_.unlock();
|
|
}
|
|
|
|
void SharedMutexStd::UnlockShared() {
|
|
mutex_.unlock_shared();
|
|
}
|
|
|
|
} // namespace fml
|