Skip to content

Commit 3d3f16f

Browse files
committed
[thread.barrier.class] Rename constructor parameter from phase_count
to `expected`. The parameter is not a phase count, and is referred to by other normative wording as `expected`; also, `expected` is the name we use for the same parameter in the constructor of `latch`.
1 parent dc61857 commit 3d3f16f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/threads.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3980,7 +3980,7 @@
39803980
public:
39813981
using arrival_token = @\seebelow@;
39823982

3983-
constexpr explicit barrier(ptrdiff_t phase_count,
3983+
constexpr explicit barrier(ptrdiff_t expected,
39843984
CompletionFunction f = CompletionFunction());
39853985
~barrier();
39863986

@@ -4073,23 +4073,23 @@
40734073

40744074
\indexlibrary{\idxcode{barrier}!constructor}
40754075
\begin{itemdecl}
4076-
constexpr explicit barrier(ptrdiff_t phase_count,
4076+
constexpr explicit barrier(ptrdiff_t expected,
40774077
CompletionFunction f = CompletionFunction());
40784078
\end{itemdecl}
40794079

40804080
\begin{itemdescr}
40814081
\pnum
40824082
\expects
4083-
\tcode{phase_count >= 0} is \tcode{true}.
4083+
\tcode{expected >= 0} is \tcode{true}.
40844084

40854085
\pnum
40864086
\effects
40874087
Sets both the initial expected count for each barrier phase and
4088-
the current expected count for the first phase to \tcode{phase_count}.
4088+
the current expected count for the first phase to \tcode{expected}.
40894089
Initializes \tcode{completion} with \tcode{std::move(f)}.
40904090
Starts the first phase.
40914091
\begin{note}
4092-
If \tcode{phase_count} is 0 this object can only be destroyed.
4092+
If \tcode{expected} is 0 this object can only be destroyed.
40934093
\end{note}
40944094

40954095
\pnum

0 commit comments

Comments
 (0)