From Jason Turner

[thread.barrier.class]

Diff to HTML by rtfpessoa

tmp/tmpa81oi2d3/{from.md → to.md} RENAMED
@@ -30,17 +30,14 @@ namespace std {
30
 
31
  Each *barrier phase* consists of the following steps:
32
 
33
  - The expected count is decremented by each call to `arrive` or
34
  `arrive_and_drop`.
35
- - When the expected count reaches zero, the phase completion step is
36
- run. For the specialization with the default value of the
37
- `CompletionFunction` template parameter, the completion step is run as
38
- part of the call to `arrive` or `arrive_and_drop` that caused the
39
- expected count to reach zero. For other specializations, the
40
- completion step is run on one of the threads that arrived at the
41
- barrier during the phase.
42
  - When the completion step finishes, the expected count is reset to what
43
  was specified by the `expected` argument to the constructor, possibly
44
  adjusted by calls to `arrive_and_drop`, and the next phase starts.
45
 
46
  Each phase defines a *phase synchronization point*. Threads that arrive
 
30
 
31
  Each *barrier phase* consists of the following steps:
32
 
33
  - The expected count is decremented by each call to `arrive` or
34
  `arrive_and_drop`.
35
+ - Exactly once after the expected count reaches zero, a thread executes
36
+ the completion step during its call to `arrive`, `arrive_and_drop`, or
37
+ `wait`, except that it is *implementation-defined* whether the step
38
+ executes if no thread calls `wait`.
 
 
 
39
  - When the completion step finishes, the expected count is reset to what
40
  was specified by the `expected` argument to the constructor, possibly
41
  adjusted by calls to `arrive_and_drop`, and the next phase starts.
42
 
43
  Each phase defines a *phase synchronization point*. Threads that arrive