#include <curl_share.hpp>
template<class Shared_mutex_t = utils::shared_mutex>
class curl::Share< Shared_mutex_t >
- Template Parameters
-
Shared_mutex_t | For shared or single lock, their unlock function must be the same function – Shared_mutex_t::unlock().
If Shared_mutex_t lock, lock_shared or unlock throw an exception, it would terminte the program.
If Shared_mutex_t has type Ret_except_t (Ret == void), then Shared_mutex_t(Ret_except_t&) would be called.
Pass void to disable locking, which make multithreaded use unsafe. |
- Examples
- curl_share.cc.
Definition at line 47 of file curl.hpp.
◆ Share()
template<class Shared_mutex_t = utils::shared_mutex>
◆ Share_base() [1/3]
template<class Shared_mutex_t = utils::shared_mutex>
curl::Share_base::Share_base |
|
noexcept |
- Parameters
-
After this ctor call, share.get() == nullptr, this class will take over the ownership.
Definition at line 15 of file curl_share.cc.
16 curl_share{std::move(share)}
◆ Share_base() [2/3]
template<class Shared_mutex_t = utils::shared_mutex>
curl::Share_base::Share_base |
|
delete |
Since libcurl doesn't provide a dup function for curl_share, neither will Share_base.
◆ Share_base() [3/3]
template<class Shared_mutex_t = utils::shared_mutex>
curl::Share_base::Share_base |
|
noexcept |
- Parameters
-
other | bool(other) can be false, but then this new instance of Share_base will be unusable. |
Definition at line 19 of file curl_share.cc.
20 curl_share{std::move(other.curl_share)}
The documentation for this class was generated from the following files: