|
1106 | 1106 | #include <compare> // see \ref{compare.syn}
|
1107 | 1107 |
|
1108 | 1108 | namespace std {
|
| 1109 | + // \ref{thread.thread.class}, class \tcode{thread} |
1109 | 1110 | class thread;
|
1110 | 1111 |
|
1111 | 1112 | void swap(thread& x, thread& y) noexcept;
|
1112 | 1113 |
|
1113 |
| - // \ref{thread.jthread.class} class \tcode{jthread} |
| 1114 | + // \ref{thread.jthread.class}, class \tcode{jthread} |
1114 | 1115 | class jthread;
|
1115 | 1116 |
|
| 1117 | + // \ref{thread.thread.this}, namespace \tcode{this_thread} |
1116 | 1118 | namespace this_thread {
|
1117 | 1119 | thread::id get_id() noexcept;
|
1118 | 1120 |
|
|
1149 | 1151 | namespace std {
|
1150 | 1152 | class thread {
|
1151 | 1153 | public:
|
1152 |
| - // types |
| 1154 | + // \ref{thread.thread.id}, class \tcode{thread::id} |
1153 | 1155 | class id;
|
1154 | 1156 | using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
|
1155 | 1157 |
|
|
1162 | 1164 | thread& operator=(const thread&) = delete;
|
1163 | 1165 | thread& operator=(thread&&) noexcept;
|
1164 | 1166 |
|
1165 |
| - // members |
| 1167 | + // \ref{thread.thread.member}, members |
1166 | 1168 | void swap(thread&) noexcept;
|
1167 | 1169 | bool joinable() const noexcept;
|
1168 | 1170 | void join();
|
|
2044 | 2046 | \indexheader{mutex}%
|
2045 | 2047 | \begin{codeblock}
|
2046 | 2048 | namespace std {
|
| 2049 | + // \ref{thread.mutex.class}, class \tcode{mutex} |
2047 | 2050 | class mutex;
|
| 2051 | + // \ref{thread.mutex.recursive}, class \tcode{recursive_mutex} |
2048 | 2052 | class recursive_mutex;
|
| 2053 | + // \ref{thread.timedmutex.class} class \tcode{timed_mutex} |
2049 | 2054 | class timed_mutex;
|
| 2055 | + // \ref{thread.timedmutex.recursive}, class \tcode{recursive_timed_mutex} |
2050 | 2056 | class recursive_timed_mutex;
|
2051 | 2057 |
|
2052 | 2058 | struct defer_lock_t { explicit defer_lock_t() = default; };
|
|
2057 | 2063 | inline constexpr try_to_lock_t try_to_lock { };
|
2058 | 2064 | inline constexpr adopt_lock_t adopt_lock { };
|
2059 | 2065 |
|
| 2066 | + // \ref{thread.lock}, locks |
2060 | 2067 | template<class Mutex> class lock_guard;
|
2061 | 2068 | template<class... MutexTypes> class scoped_lock;
|
2062 | 2069 | template<class Mutex> class unique_lock;
|
2063 | 2070 |
|
2064 | 2071 | template<class Mutex>
|
2065 | 2072 | void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y) noexcept;
|
2066 | 2073 |
|
| 2074 | + // \ref{thread.lock.algorithm}, generic locking algorithms |
2067 | 2075 | template<class L1, class L2, class... L3> int try_lock(L1&, L2&, L3&...);
|
2068 | 2076 | template<class L1, class L2, class... L3> void lock(L1&, L2&, L3&...);
|
2069 | 2077 |
|
|
2079 | 2087 | \indexheader{shared_mutex}%
|
2080 | 2088 | \begin{codeblock}
|
2081 | 2089 | namespace std {
|
| 2090 | + // \ref{thread.sharedmutex.class}, class \tcode{shared_mutex} |
2082 | 2091 | class shared_mutex;
|
| 2092 | + // \ref{thread.sharedtimedmutex.class}, class \tcode{shared_timed_mutex} |
2083 | 2093 | class shared_timed_mutex;
|
| 2094 | + // \ref{thread.lock.shared}, class template \tcode{shared_lock} |
2084 | 2095 | template<class Mutex> class shared_lock;
|
2085 | 2096 | template<class Mutex>
|
2086 | 2097 | void swap(shared_lock<Mutex>& x, shared_lock<Mutex>& y) noexcept;
|
|
4313 | 4324 | \indexlibraryglobal{cv_status}%
|
4314 | 4325 | \begin{codeblock}
|
4315 | 4326 | namespace std {
|
| 4327 | + // \ref{thread.condition.condvar}, class \tcode{condition_variable} |
4316 | 4328 | class condition_variable;
|
| 4329 | + // \ref{thread.condition.condvarany}, class \tcode{condition_variable_any} |
4317 | 4330 | class condition_variable_any;
|
4318 | 4331 |
|
| 4332 | + // \ref{thread.condition.nonmember}, non-member functions |
4319 | 4333 | void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
|
4320 | 4334 |
|
4321 | 4335 | enum class cv_status { no_timeout, timeout };
|
|
5246 | 5260 | \indexheader{semaphore}%
|
5247 | 5261 | \begin{codeblock}
|
5248 | 5262 | namespace std {
|
| 5263 | + // \ref{thread.sema.cnt}, class template \tcode{counting_semaphore} |
5249 | 5264 | template<ptrdiff_t least_max_value = @\impdef@>
|
5250 | 5265 | class counting_semaphore;
|
5251 | 5266 |
|
|
5955 | 5970 | deferred
|
5956 | 5971 | };
|
5957 | 5972 |
|
| 5973 | + // \ref{futures.errors}, error handling |
5958 | 5974 | template<> struct is_error_code_enum<future_errc> : public true_type { };
|
5959 | 5975 | error_code make_error_code(future_errc e) noexcept;
|
5960 | 5976 | error_condition make_error_condition(future_errc e) noexcept;
|
5961 | 5977 |
|
5962 | 5978 | const error_category& future_category() noexcept;
|
5963 | 5979 |
|
| 5980 | + // \ref{futures.future.error}, class \tcode{future_error} |
5964 | 5981 | class future_error;
|
5965 | 5982 |
|
| 5983 | + // \ref{futures.promise}, class template \tcode{promise} |
5966 | 5984 | template<class R> class promise;
|
5967 | 5985 | template<class R> class promise<R&>;
|
5968 | 5986 | template<> class promise<void>;
|
|
5973 | 5991 | template<class R, class Alloc>
|
5974 | 5992 | struct uses_allocator<promise<R>, Alloc>;
|
5975 | 5993 |
|
| 5994 | + // \ref{futures.unique.future}, class template \tcode{future} |
5976 | 5995 | template<class R> class future;
|
5977 | 5996 | template<class R> class future<R&>;
|
5978 | 5997 | template<> class future<void>;
|
5979 | 5998 |
|
| 5999 | + // \ref{futures.shared.future}, class template \tcode{shared_future} |
5980 | 6000 | template<class R> class shared_future;
|
5981 | 6001 | template<class R> class shared_future<R&>;
|
5982 | 6002 | template<> class shared_future<void>;
|
5983 | 6003 |
|
| 6004 | + // \ref{futures.task}, class template \tcode{packaged_task} |
5984 | 6005 | template<class> class packaged_task; // \notdef
|
5985 | 6006 | template<class R, class... ArgTypes>
|
5986 | 6007 | class packaged_task<R(ArgTypes...)>;
|
5987 | 6008 |
|
5988 | 6009 | template<class R, class... ArgTypes>
|
5989 | 6010 | void swap(packaged_task<R(ArgTypes...)>&, packaged_task<R(ArgTypes...)>&) noexcept;
|
5990 | 6011 |
|
| 6012 | + // \ref{futures.async}, function template \tcode{async} |
5991 | 6013 | template<class F, class... Args>
|
5992 | 6014 | [[nodiscard]] future<invoke_result_t<decay_t<F>, decay_t<Args>...>>
|
5993 | 6015 | async(F&& f, Args&&... args);
|
|
0 commit comments