1010#include < thread>
1111
1212/* *
13- * @ file gthreads.h
14- * @ brief Small compatibility wrapper providing a jthread-like type.
13+ * \ file gthreads.h
14+ * \ brief Small compatibility wrapper providing a jthread-like type.
1515 *
1616 * This header defines \c jthread_alias, which maps to:
1717 * - \c std::jthread when the standard library provides it (C++20 and library support), or
3232
3333/* *
3434 * @typedef jthread_alias
35- * @ brief Alias to \c std::jthread when available.
35+ * \ brief Alias to \c std::jthread when available.
3636 *
3737 * When \c std::jthread exists, it provides automatic joining and cooperative cancellation
3838 * (via stop tokens) in the standard way.
@@ -46,7 +46,7 @@ using jthread_alias = std::jthread;
4646
4747/* *
4848 * @class jthread_alias
49- * @ brief Fallback RAII "join-on-destruction" thread wrapper.
49+ * \ brief Fallback RAII "join-on-destruction" thread wrapper.
5050 *
5151 * This class is used when \c std::jthread is not available in the standard library.
5252 *
@@ -72,7 +72,7 @@ using jthread_alias = std::jthread;
7272class jthread_alias
7373{
7474 /* *
75- * @ brief Owned thread instance.
75+ * \ brief Owned thread instance.
7676 *
7777 * Invariant: \c t_ is either default-constructed (not joinable), moved-from (not joinable),
7878 * or represents a running/finished thread that may be joinable.
@@ -81,19 +81,19 @@ class jthread_alias
8181
8282public:
8383 /* *
84- * @ brief Construct an empty (non-joinable) wrapper.
84+ * \ brief Construct an empty (non-joinable) wrapper.
8585 *
8686 * After default construction, \ref jthread_alias::joinable "joinable()" returns @c false.
8787 */
8888 jthread_alias () noexcept = default ;
8989
9090 /* *
91- * @ brief Start a new thread by forwarding arguments to the underlying \c std::thread.
91+ * \ brief Start a new thread by forwarding arguments to the underlying \c std::thread.
9292 *
9393 * @tparam F Callable type.
9494 * @tparam Args Argument pack forwarded to @p f.
95- * @ param f Callable to run in the new thread.
96- * @ param args Arguments passed to @p f.
95+ * \ param f Callable to run in the new thread.
96+ * \ param args Arguments passed to @p f.
9797 *
9898 * @note This constructor is \c explicit to avoid accidental implicit thread starts.
9999 */
@@ -109,7 +109,7 @@ class jthread_alias
109109 jthread_alias& operator =(const jthread_alias&) = delete ;
110110
111111 /* *
112- * @ brief Join the underlying thread on destruction if still joinable.
112+ * \ brief Join the underlying thread on destruction if still joinable.
113113 *
114114 * This mirrors the "safe by default" behavior typically sought with \c std::jthread.
115115 *
@@ -118,13 +118,13 @@ class jthread_alias
118118 ~jthread_alias () { if (t_.joinable ()) t_.join (); }
119119
120120 /* *
121- * @ brief Check whether the underlying thread can be joined.
122- * @ return @c true if joinable, @c false otherwise.
121+ * \ brief Check whether the underlying thread can be joined.
122+ * \ return @c true if joinable, @c false otherwise.
123123 */
124124 bool joinable () const noexcept { return t_.joinable (); }
125125
126126 /* *
127- * @ brief Join the underlying thread.
127+ * \ brief Join the underlying thread.
128128 *
129129 * Preconditions match \c std::thread::join.
130130 *
@@ -134,30 +134,30 @@ class jthread_alias
134134 void join () { t_.join (); }
135135
136136 /* *
137- * @ brief Detach the underlying thread.
137+ * \ brief Detach the underlying thread.
138138 *
139139 * After detaching, the wrapper no longer represents a joinable thread, and the destructor
140140 * will not join.
141141 */
142142 void detach () { t_.detach (); }
143143
144144 /* *
145- * @ brief Get the underlying thread id.
146- * @ return The \c std::thread::id of the owned thread.
145+ * \ brief Get the underlying thread id.
146+ * \ return The \c std::thread::id of the owned thread.
147147 */
148148 std::thread::id get_id () const noexcept { return t_.get_id (); }
149149
150150 /* *
151- * @ brief Access the native handle of the underlying thread.
152- * @ return Native handle as returned by \c std::thread::native_handle.
151+ * \ brief Access the native handle of the underlying thread.
152+ * \ return Native handle as returned by \c std::thread::native_handle.
153153 *
154154 * @note This is provided for integration with low-level platform APIs when needed.
155155 */
156156 auto native_handle () { return t_.native_handle (); }
157157
158158 /* *
159- * @ brief Swap the underlying thread with another wrapper.
160- * @ param other Wrapper to swap with.
159+ * \ brief Swap the underlying thread with another wrapper.
160+ * \ param other Wrapper to swap with.
161161 *
162162 * After swapping, each wrapper owns the other's prior thread.
163163 */
0 commit comments