From Jason Turner

[thread.threads]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpa1zue0f9/{from.md → to.md} +7 -10
tmp/tmpa1zue0f9/{from.md → to.md} RENAMED
@@ -172,12 +172,12 @@ representations.
172
 
173
  ``` cpp
174
  template <> struct hash<thread::id>;
175
  ```
176
 
177
- *Requires:* the template specialization shall meet the requirements of
178
- class template `hash` ([[unord.hash]]).
179
 
180
  #### `thread` constructors <a id="thread.thread.constr">[[thread.thread.constr]]</a>
181
 
182
  ``` cpp
183
  thread() noexcept;
@@ -195,10 +195,13 @@ template <class F, class ...Args> explicit thread(F&& f, Args&&... args);
195
  *Requires:*  `F` and each `Ti` in `Args` shall satisfy the
196
  `MoveConstructible` requirements. *`INVOKE`*`(`*`DECAY_COPY`*`(`
197
  `std::forward<F>(f)), `*`DECAY_COPY`*`(std::forward<Args>(args))...)` ([[func.require]])
198
  shall be a valid expression.
199
 
 
 
 
200
  *Effects:*  Constructs an object of type `thread`. The new thread of
201
  execution executes
202
  *`INVOKE`*`(`*`DECAY_COPY`*`(` `std::forward<F>(f)), `*`DECAY_COPY`*`(std::forward<Args>(args))...)`
203
  with the calls to *`DECAY_COPY`* being evaluated in the constructing
204
  thread. Any return value from this invocation is ignored. This implies
@@ -389,15 +392,11 @@ template <class Clock, class Duration>
389
  *Effects:* Blocks the calling thread for the absolute
390
  timeout ([[thread.req.timing]]) specified by `abs_time`.
391
 
392
  *Synchronization:* None.
393
 
394
- *Throws:* Nothing if `Clock` satisfies the `TrivialClock`
395
- requirements ([[time.clock.req]]) and operations of `Duration` do not
396
- throw exceptions. instantiations of time point types and clocks supplied
397
- by the implementation as specified in  [[time.clock]] do not throw
398
- exceptions.
399
 
400
  ``` cpp
401
  template <class Rep, class Period>
402
  void sleep_for(const chrono::duration<Rep, Period>& rel_time);
403
  ```
@@ -405,9 +404,7 @@ template <class Rep, class Period>
405
  *Effects:* Blocks the calling thread for the relative
406
  timeout ([[thread.req.timing]]) specified by `rel_time`.
407
 
408
  *Synchronization:* None.
409
 
410
- *Throws:* Nothing if operations of `chrono::duration<Rep, Period>` do
411
- not throw exceptions. instantiations of duration types supplied by the
412
- implementation as specified in  [[time.clock]] do not throw exceptions.
413
 
 
172
 
173
  ``` cpp
174
  template <> struct hash<thread::id>;
175
  ```
176
 
177
+ The template specialization shall meet the requirements of class
178
+ template `hash` ([[unord.hash]]).
179
 
180
  #### `thread` constructors <a id="thread.thread.constr">[[thread.thread.constr]]</a>
181
 
182
  ``` cpp
183
  thread() noexcept;
 
195
  *Requires:*  `F` and each `Ti` in `Args` shall satisfy the
196
  `MoveConstructible` requirements. *`INVOKE`*`(`*`DECAY_COPY`*`(`
197
  `std::forward<F>(f)), `*`DECAY_COPY`*`(std::forward<Args>(args))...)` ([[func.require]])
198
  shall be a valid expression.
199
 
200
+ *Remarks:* This constructor shall not participate in overload resolution
201
+ if `decay_t<F>` is the same type as `std::thread`.
202
+
203
  *Effects:*  Constructs an object of type `thread`. The new thread of
204
  execution executes
205
  *`INVOKE`*`(`*`DECAY_COPY`*`(` `std::forward<F>(f)), `*`DECAY_COPY`*`(std::forward<Args>(args))...)`
206
  with the calls to *`DECAY_COPY`* being evaluated in the constructing
207
  thread. Any return value from this invocation is ignored. This implies
 
392
  *Effects:* Blocks the calling thread for the absolute
393
  timeout ([[thread.req.timing]]) specified by `abs_time`.
394
 
395
  *Synchronization:* None.
396
 
397
+ *Throws:* Timeout-related exceptions ([[thread.req.timing]]).
 
 
 
 
398
 
399
  ``` cpp
400
  template <class Rep, class Period>
401
  void sleep_for(const chrono::duration<Rep, Period>& rel_time);
402
  ```
 
404
  *Effects:* Blocks the calling thread for the relative
405
  timeout ([[thread.req.timing]]) specified by `rel_time`.
406
 
407
  *Synchronization:* None.
408
 
409
+ *Throws:* Timeout-related exceptions ([[thread.req.timing]]).
 
 
410