Flutter Engine
shared_mutex_std.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_FML_SYNCHRONIZATION_SHARED_MUTEX_STD_H_
6 #define FLUTTER_FML_SYNCHRONIZATION_SHARED_MUTEX_STD_H_
7 
8 #include "flutter/fml/synchronization/shared_mutex.h"
9 
10 #include <shared_mutex>
11 
12 namespace fml {
13 
14 class SharedMutexStd : public SharedMutex {
15  public:
16  virtual void Lock();
17  virtual void LockShared();
18  virtual void Unlock();
19  virtual void UnlockShared();
20 
21  private:
23  SharedMutexStd() = default;
24 
25  std::shared_timed_mutex mutex_;
26 };
27 
28 } // namespace fml
29 
30 #endif // FLUTTER_FML_SYNCHRONIZATION_SHARED_MUTEX_STD_H_
virtual void LockShared()
Definition: ascii_trie.cc:9
virtual void Unlock()
static SharedMutex * Create()
virtual void UnlockShared()