Corelink CPP Client
Corelink C++ client library
 
Loading...
Searching...
No Matches
reader_writer_lock_shim.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "platform_macros.hpp"
5
6namespace corelink
7{
8 namespace commons
9 {
10 using exclusive_mutex = std::mutex;
11 using exclusive_lock = std::lock_guard<exclusive_mutex>;
12#if defined(CORELINK_CPP17_SUPPORTED)
13 using reader_writer_mutex = std::shared_mutex;
14 using reader_lock = std::shared_lock<reader_writer_mutex>;
15#elif defined(CORELINK_CPP14_SUPPORTED)
16 using reader_writer_mutex = std::shared_timed_mutex;
17 using reader_lock = std::shared_lock<reader_writer_mutex>;
18#else
21#endif
22 using writer_lock = std::lock_guard<reader_writer_mutex>;
23 }
24}