diff --git a/include/boost/lockfree/spsc_value.hpp b/include/boost/lockfree/spsc_value.hpp index 8953fac..ee25865 100644 --- a/include/boost/lockfree/spsc_value.hpp +++ b/include/boost/lockfree/spsc_value.hpp @@ -43,7 +43,8 @@ namespace lockfree { /** The spcs_value provides a single-writer/single-reader value, implemented by a triple buffer * * \b Policies: - * - \ref boost::lockfree::allow_multiple_reads, defaults to \c boost::lockfree::allow_multiple_reads \n + * - \ref boost::lockfree::allow_multiple_reads, defaults to + * \ref boost::lockfree::allow_multiple_reads "boost::lockfree::allow_multiple_reads" \n * If multiple reads are allowed, a value written to the spsc_value can be read multiple times, but not moved out * of the instance. If multiple reads are not allowed, the class works as single-element queue that overwrites on * write @@ -62,15 +63,16 @@ struct spsc_value public: #endif - /** Construct a spcs_value + /** Construct a \ref boost::lockfree::spsc_value "spsc_value" * - * If configured with allow_multiple_reads it is initialized to a default-constructed value + * If configured with \ref boost::lockfree::allow_multiple_reads "boost::lockfree::allow_multiple_reads" it + * is initialized to a default-constructed value * * */ explicit spsc_value() {} - /** Construct a spcs_value, initialized to a value + /** Construct a \ref boost::lockfree::spsc_value "spsc_value", initialized to a value * */ explicit spsc_value( T value ) : m_write_index { @@ -86,10 +88,10 @@ struct spsc_value m_buffer[ 0 ].value = std::move( value ); } - /** Writes an object to the value. + /** Writes `value` to the \ref boost::lockfree::spsc_value "spsc_value" * - * \pre only one thread is allowed to write data to the spcs_value - * \post object will be written to the spsc_queue + * \pre only one thread is allowed to write data to the \ref boost::lockfree::spsc_value "spsc_value" + * \post object will be written to the \ref boost::lockfree::spsc_value "spsc_value" * * \note Thread-safe and wait-free * */ @@ -106,12 +108,13 @@ struct spsc_value swap_write_buffer(); } - /** Reads an object from the value. + /** Reads content of the \ref boost::lockfree::spsc_value "spsc_value" * - * \pre only one thread is allowed to write data to the spcs_value - * \post if read operation is successful, object will be copied to ret. - * \returns true, if the read operation is successful, false if the spsc_value is configured with - * allow_multiple_reads and no value is available for reading + * \pre only one thread is allowed to write data to the \ref boost::lockfree::spsc_value "spsc_value" + * \post if read operation is successful, object will be copied to `ret`. + * \returns `true`, if the read operation is successful, false if the \ref boost::lockfree::spsc_value "spsc_value" is + * configured with \ref boost::lockfree::allow_multiple_reads + * "boost::lockfree::allow_multiple_reads" and no value is available for reading * * \note Thread-safe and wait-free * */ @@ -138,7 +141,7 @@ struct spsc_value * * reads element from the spsc_value and applies the functor on this object * - * \returns true, if element was consumed + * \returns `true`, if element was consumed * * \note Thread-safe and non-blocking, if functor is thread-safe and non-blocking * */