diff --git a/source/exec.tex b/source/exec.tex index 98cbc0e456..87444fbd26 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -6485,7 +6485,8 @@ \begin{itemdescr} \pnum \ensures -\exposid{count} is \tcode{0} and \exposid{state} is \exposid{starting}. +The \tcode{run_loop} instance's count is 0 and +its state is starting. \end{itemdescr} \indexlibrarydtor{run_loop}% @@ -6496,7 +6497,8 @@ \begin{itemdescr} \pnum \effects -If \exposid{count} is not \tcode{0} or if \exposid{state} is \exposid{running}, +If the \tcode{run_loop} instance's count is not 0 or +if its state is running, invokes \tcode{terminate}\iref{except.terminate}. Otherwise, has no effects. \end{itemdescr} @@ -6513,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} +The \tcode{run_loop} instance's count is 0 and its state is finishing, +in which case \exposid{pop-front} sets the state to finished and returns \tcode{nullptr}; or \item -\exposid{count} is greater than \tcode{0}, +the \tcode{run_loop} instance's count is greater than 0, in which case an item is removed from the front of the queue, -\exposid{count} is decremented by \tcode{1}, and +the count is decremented by \tcode{1}, and the removed item is returned. \end{itemize} \end{itemdescr} @@ -6532,7 +6534,7 @@ \pnum \effects Adds \tcode{item} to the back of the queue and -increments \exposid{count} by \tcode{1}. +increments the \tcode{run_loop} instance's count by 1.. \pnum \sync @@ -6560,13 +6562,13 @@ \begin{itemdescr} \pnum \expects -\exposid{state} is either \exposid{starting} or \exposid{finishing}. +The \tcode{run_loop} instance's 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 the \tcode{run_loop} instance's state is starting, +sets the state to running, +otherwise leaves the state unchanged. Then, equivalent to: \begin{codeblock} while (auto* op = @\exposid{pop-front}@()) { @@ -6576,7 +6578,8 @@ \pnum \remarks -When \exposid{state} changes, it does so without introducing data races. +When the \tcode{run_loop} instance's state changes, +it does so without introducing data races. \end{itemdescr} \indexlibrarymember{finish}{run_loop}% @@ -6587,11 +6590,11 @@ \begin{itemdescr} \pnum \expects -\exposid{state} is either \exposid{starting} or \exposid{running}. +The \tcode{run_loop} instance's state is either starting or running. \pnum \effects -Changes \exposid{state} to \exposid{finishing}. +Changes the \tcode{run_loop} instance's state to finishing. \pnum \sync