Expand section about thread safety in documentation.
This commit is contained in:
parent
e4a5b8e9ce
commit
839e29b37b
|
@ -88,6 +88,14 @@
|
||||||
* (https://curl.haxx.se/libcurl/c/curl_global_cleanup.html) is called. Both
|
* (https://curl.haxx.se/libcurl/c/curl_global_cleanup.html) is called. Both
|
||||||
* are not thread safe.
|
* are not thread safe.
|
||||||
*
|
*
|
||||||
|
* Do not make 2 requests with the same @link mastodonpp::Connection Connection
|
||||||
|
* @endlink at the same time. You can create as many @link
|
||||||
|
* mastodonpp::Connection Connection@endlink%s as you want from one @link
|
||||||
|
* mastodonpp::Instance Instance@endlink.
|
||||||
|
*
|
||||||
|
* If you are using libcurl with OpenSSL before 1.1.0, please read
|
||||||
|
* [libcurl-thread(3)](https://curl.haxx.se/libcurl/c/threadsafe.html).
|
||||||
|
*
|
||||||
* @example example01_instance_info.cpp
|
* @example example01_instance_info.cpp
|
||||||
* @example example02_streaming.cpp
|
* @example example02_streaming.cpp
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -36,6 +36,7 @@ using std::atomic;
|
||||||
using std::uint8_t;
|
using std::uint8_t;
|
||||||
using std::uint16_t;
|
using std::uint16_t;
|
||||||
|
|
||||||
|
// No one will ever need more than 65535 connections. 😉
|
||||||
static atomic<uint16_t> curlwrapper_instances{0};
|
static atomic<uint16_t> curlwrapper_instances{0};
|
||||||
|
|
||||||
CURLWrapper::CURLWrapper()
|
CURLWrapper::CURLWrapper()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user