From Jason Turner

[thread.condition]

Diff to HTML by rtfpessoa

tmp/tmp7deqn9un/{from.md → to.md} RENAMED
@@ -59,11 +59,11 @@ void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
59
  supplied by all concurrently waiting (via `wait`, `wait_for`, or
60
  `wait_until`) threads.
61
 
62
  *Effects:* Transfers ownership of the lock associated with `lk` into
63
  internal storage and schedules `cond` to be notified when the current
64
- thread exits, after all objects of thread storage duration associated
65
  with the current thread have been destroyed. This notification is
66
  equivalent to:
67
 
68
  ``` cpp
69
  lk.unlock();
@@ -76,11 +76,11 @@ the current thread.
76
 
77
  [*Note 1*: The supplied lock is held until the thread exits, which
78
  might cause deadlock due to lock ordering issues. — *end note*]
79
 
80
  [*Note 2*: It is the user’s responsibility to ensure that waiting
81
- threads do not erroneously assume that the thread has finished if they
82
  experience spurious wakeups. This typically requires that the condition
83
  being waited for is satisfied while holding the lock on `lk`, and that
84
  this lock is not released and reacquired prior to calling
85
  `notify_all_at_thread_exit`. — *end note*]
86
 
@@ -385,13 +385,13 @@ exception. — *end note*]
385
 
386
  ### Class `condition_variable_any` <a id="thread.condition.condvarany">[[thread.condition.condvarany]]</a>
387
 
388
  #### General <a id="thread.condition.condvarany.general">[[thread.condition.condvarany.general]]</a>
389
 
390
- In this subclause [[thread.condition.condvarany]], template arguments
391
- for template parameters named `Lock` shall meet the *Cpp17BasicLockable*
392
- requirements [[thread.req.lockable.basic]].
393
 
394
  [*Note 1*: All of the standard mutex types meet this requirement. If a
395
  type other than one of the standard mutex types or a `unique_lock`
396
  wrapper for a standard mutex type is used with `condition_variable_any`,
397
  any necessary synchronization is assumed to be in place with respect to
 
59
  supplied by all concurrently waiting (via `wait`, `wait_for`, or
60
  `wait_until`) threads.
61
 
62
  *Effects:* Transfers ownership of the lock associated with `lk` into
63
  internal storage and schedules `cond` to be notified when the current
64
+ thread exits, after all objects with thread storage duration associated
65
  with the current thread have been destroyed. This notification is
66
  equivalent to:
67
 
68
  ``` cpp
69
  lk.unlock();
 
76
 
77
  [*Note 1*: The supplied lock is held until the thread exits, which
78
  might cause deadlock due to lock ordering issues. — *end note*]
79
 
80
  [*Note 2*: It is the user’s responsibility to ensure that waiting
81
+ threads do not incorrectly assume that the thread has finished if they
82
  experience spurious wakeups. This typically requires that the condition
83
  being waited for is satisfied while holding the lock on `lk`, and that
84
  this lock is not released and reacquired prior to calling
85
  `notify_all_at_thread_exit`. — *end note*]
86
 
 
385
 
386
  ### Class `condition_variable_any` <a id="thread.condition.condvarany">[[thread.condition.condvarany]]</a>
387
 
388
  #### General <a id="thread.condition.condvarany.general">[[thread.condition.condvarany.general]]</a>
389
 
390
+ In [[thread.condition.condvarany]], template arguments for template
391
+ parameters named `Lock` shall meet the *Cpp17BasicLockable* requirements
392
+ [[thread.req.lockable.basic]].
393
 
394
  [*Note 1*: All of the standard mutex types meet this requirement. If a
395
  type other than one of the standard mutex types or a `unique_lock`
396
  wrapper for a standard mutex type is used with `condition_variable_any`,
397
  any necessary synchronization is assumed to be in place with respect to