curl-cpp
static c++17 wrapper for curl with -fno-exceptions support
|
#include <shared_mutex.hpp>
Public Member Functions | |
shared_mutex () noexcept | |
shared_mutex (const shared_mutex &)=delete | |
shared_mutex (shared_mutex &&)=delete | |
shared_mutex & | operator= (const shared_mutex &)=delete |
shared_mutex & | operator= (shared_mutex &&)=delete |
void | lock () noexcept |
void | lock_shared () noexcept |
void | unlock () noexcept |
C++ RAII wrapper for pthread_rwlock_t.
To use this interface, you'd have to add -lpthread to LDFLAGS of your project.
This class is designed specifically for curl::Share, which requires a std::shared_mutex like interface, but have to be able to unlock shared lock/normal lock with a single function.
Definition at line 18 of file shared_mutex.hpp.
|
noexcept |
On failure, call err to terminate the program.
Definition at line 14 of file shared_mutex.cc.
|
noexcept |
Undefined behavior if deadlocks.
Definition at line 30 of file shared_mutex.cc.
|
noexcept |
Undefined behavior if deadlocks.
Definition at line 34 of file shared_mutex.cc.
|
noexcept |
One unlock function for lock()/lock_shared().
Definition at line 42 of file shared_mutex.cc.