Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions source/exec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6487,7 +6487,7 @@
\begin{itemdescr}
\pnum
\ensures
\exposid{count} is \tcode{0} and \exposid{state} is \exposid{starting}.
Count is \tcode{0} and state is starting.
\end{itemdescr}

\indexlibrarydtor{run_loop}%
Expand All @@ -6498,7 +6498,7 @@
\begin{itemdescr}
\pnum
\effects
If \exposid{count} is not \tcode{0} or if \exposid{state} is \exposid{running},
If count is not \tcode{0} or if state is running,
invokes \tcode{terminate}\iref{except.terminate}.
Otherwise, has no effects.
\end{itemdescr}
Expand All @@ -6515,13 +6515,13 @@
Blocks\iref{defns.block} until one of the following conditions is \tcode{true}:
\begin{itemize}
\item
\exposid{count} is \tcode{0} and \exposid{state} is \exposid{finishing},
in which case \exposid{pop-front} sets \exposid{state} to \exposid{finished}
Count is \tcode{0} and state is finishing,
in which case \exposid{pop-front} sets state to finished
and returns \tcode{nullptr}; or
\item
\exposid{count} is greater than \tcode{0},
count is greater than \tcode{0},
in which case an item is removed from the front of the queue,
\exposid{count} is decremented by \tcode{1}, and
count is decremented by \tcode{1}, and
the removed item is returned.
\end{itemize}
\end{itemdescr}
Expand All @@ -6534,7 +6534,7 @@
\pnum
\effects
Adds \tcode{item} to the back of the queue and
increments \exposid{count} by \tcode{1}.
increments count by \tcode{1}.

\pnum
\sync
Expand Down Expand Up @@ -6562,13 +6562,13 @@
\begin{itemdescr}
\pnum
\expects
\exposid{state} is either \exposid{starting} or \exposid{finishing}.
State is either starting or finishing.

\pnum
\effects
If \exposid{state} is \exposid{starting},
sets the \exposid{state} to \exposid{running},
otherwise leaves \exposid{state} unchanged.
If state is starting,
sets the state to running,
otherwise leaves state unchanged.
Then, equivalent to:
\begin{codeblock}
while (auto* op = @\exposid{pop-front}@()) {
Expand All @@ -6578,7 +6578,7 @@

\pnum
\remarks
When \exposid{state} changes, it does so without introducing data races.
When state changes, it does so without introducing data races.
\end{itemdescr}

\indexlibrarymember{finish}{run_loop}%
Expand All @@ -6589,11 +6589,11 @@
\begin{itemdescr}
\pnum
\expects
\exposid{state} is either \exposid{starting} or \exposid{running}.
state is either starting or running.

\pnum
\effects
Changes \exposid{state} to \exposid{finishing}.
Changes state to finishing.

\pnum
\sync
Expand Down