From bbd044582181bb6e6a64cb1dedcb813c51f5e0ce Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 8 Jan 2020 10:54:59 +0100 Subject: [PATCH] Add sections about thread safety and text input to documentation. --- include/mastodonpp.hpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/include/mastodonpp.hpp b/include/mastodonpp.hpp index 113ec0b..85f1214 100644 --- a/include/mastodonpp.hpp +++ b/include/mastodonpp.hpp @@ -45,7 +45,7 @@ * * Or compile your code with `g++ $(pkg-config --cflags --libs mastodonpp)`. * - * @subsection Example + * @subsection example Example * * @code * #include @@ -67,27 +67,36 @@ * } * @endcode * + * @subsection input Input + * + * All text input is expected to be UTF-8. + * * @section exceptions Exceptions * * Any unrecoverable libcurl error will be thrown as a * mastodonpp::CURLException. Network errors will **not** be thrown, but * reported via the return value. * + * @section thread_safety Thread safety + * + * The first time you construct an @link mastodonpp::Instance Instance @endlink + * or @link mastodonpp::Connection Connection @endlink, [curl_global_init()] + * (https://curl.haxx.se/libcurl/c/curl_global_init.html) is called. When the + * last @link mastodonpp::Instance Instance @endlink or @link + * mastodonpp::Connection Connection @endlink is destroyed, + * [curl_global_cleanup()] + * (https://curl.haxx.se/libcurl/c/curl_global_cleanup.html) is called. Both + * are not thread safe. + * * @example example01_instance_info.cpp */ /*! * @brief C++ wrapper for the Mastodon %API. * - * All text input is expected to be UTF-8. - * * @since 0.1.0 */ namespace mastodonpp -{ - - - -} // namespace mastodonpp +{} // namespace mastodonpp #endif // MASTODONPP_HPP