From 1e1125d2a35edb1c8087ae0f224bde4e4ae6ff3d Mon Sep 17 00:00:00 2001 From: cliffg-softwarelibre Date: Sun, 19 May 2024 17:24:51 -0600 Subject: [PATCH] Doxygen formatting tweaks --- include/queue/wait_queue.hpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/include/queue/wait_queue.hpp b/include/queue/wait_queue.hpp index 0e55e6e..95e023f 100644 --- a/include/queue/wait_queue.hpp +++ b/include/queue/wait_queue.hpp @@ -1,4 +1,6 @@ /** @mainpage Wait Queue, a Multi-Writer / Multi-Reader (MPMC) Thread-Safe Queue + * + * ## Overview * * This class allows transferring data between threads with queue semantics (push, pop), * using C++ std library general facilities (mutex, condition variable). An internal @@ -52,7 +54,7 @@ * the API is significantly changed and additional features added. The name of the utility * class template in Anthony's book is @c threadsafe_queue. * - * Additional details: + * ### Additional Details * * Each method is fully documented in the class documentation. In particular, function * arguments, pre-conditions, and return values are all documented. @@ -301,6 +303,11 @@ class wait_queue { * * For an internal @c std::stop_token, all waiting reader threaders will be notified. * Subsequent @c push operations will return @c false. + * + * @return @c true if an internal @c stop_source was used (versus a @c std::stop_token + * passed in to the constructor) and the request returns @c true, @c false if an + * external @c std::stop_token was passed in. + * */ bool request_stop() noexcept { if (m_stop_src) { @@ -396,7 +403,8 @@ class wait_queue { * available, otherwise return an empty @c std::optional. * * @return A value from the @c wait_queue or an empty @c std::optional if no values are - * available in the @c wait_queue. + * available in the @c wait_queue or if the @c wait_queue has been requested to be + * stopped . */ std::optional try_pop() /* noexcept(std::is_nothrow_constructible::value) */ { if (m_stop_tok.stop_requested()) { @@ -447,7 +455,7 @@ class wait_queue { } /** - * Query whether a @ request_stop method (passed through a @c stop_token) has been called on + * Query whether a @ request_stop method has been called on * the @c wait_queue. * * @return @c true if the @c stop_requested has been called.