Expand section about thread safety in documentation.

This commit is contained in:
tastytea 2020-01-09 11:23:30 +01:00
parent e4a5b8e9ce
commit 839e29b37b
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 9 additions and 0 deletions

View File

@ -88,6 +88,14 @@
* (https://curl.haxx.se/libcurl/c/curl_global_cleanup.html) is called. Both
* 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 example02_streaming.cpp
*/

View File

@ -36,6 +36,7 @@ using std::atomic;
using std::uint8_t;
using std::uint16_t;
// No one will ever need more than 65535 connections. 😉
static atomic<uint16_t> curlwrapper_instances{0};
CURLWrapper::CURLWrapper()