|
6487 | 6487 | \begin{itemdescr}
|
6488 | 6488 | \pnum
|
6489 | 6489 | \ensures
|
6490 |
| -\exposid{count} is \tcode{0} and \exposid{state} is \exposid{starting}. |
| 6490 | +Count is \tcode{0} and state is starting. |
6491 | 6491 | \end{itemdescr}
|
6492 | 6492 |
|
6493 | 6493 | \indexlibrarydtor{run_loop}%
|
|
6498 | 6498 | \begin{itemdescr}
|
6499 | 6499 | \pnum
|
6500 | 6500 | \effects
|
6501 |
| -If \exposid{count} is not \tcode{0} or if \exposid{state} is \exposid{running}, |
| 6501 | +If count is not \tcode{0} or if state is running, |
6502 | 6502 | invokes \tcode{terminate}\iref{except.terminate}.
|
6503 | 6503 | Otherwise, has no effects.
|
6504 | 6504 | \end{itemdescr}
|
|
6515 | 6515 | Blocks\iref{defns.block} until one of the following conditions is \tcode{true}:
|
6516 | 6516 | \begin{itemize}
|
6517 | 6517 | \item
|
6518 |
| -\exposid{count} is \tcode{0} and \exposid{state} is \exposid{finishing}, |
6519 |
| -in which case \exposid{pop-front} sets \exposid{state} to \exposid{finished} |
| 6518 | +Count is \tcode{0} and state is finishing, |
| 6519 | +in which case \exposid{pop-front} sets state to finished |
6520 | 6520 | and returns \tcode{nullptr}; or
|
6521 | 6521 | \item
|
6522 |
| -\exposid{count} is greater than \tcode{0}, |
| 6522 | +count is greater than \tcode{0}, |
6523 | 6523 | in which case an item is removed from the front of the queue,
|
6524 |
| -\exposid{count} is decremented by \tcode{1}, and |
| 6524 | +count is decremented by \tcode{1}, and |
6525 | 6525 | the removed item is returned.
|
6526 | 6526 | \end{itemize}
|
6527 | 6527 | \end{itemdescr}
|
|
6534 | 6534 | \pnum
|
6535 | 6535 | \effects
|
6536 | 6536 | Adds \tcode{item} to the back of the queue and
|
6537 |
| -increments \exposid{count} by \tcode{1}. |
| 6537 | +increments count by \tcode{1}. |
6538 | 6538 |
|
6539 | 6539 | \pnum
|
6540 | 6540 | \sync
|
|
6562 | 6562 | \begin{itemdescr}
|
6563 | 6563 | \pnum
|
6564 | 6564 | \expects
|
6565 |
| -\exposid{state} is either \exposid{starting} or \exposid{finishing}. |
| 6565 | +State is either starting or finishing. |
6566 | 6566 |
|
6567 | 6567 | \pnum
|
6568 | 6568 | \effects
|
6569 |
| -If \exposid{state} is \exposid{starting}, |
6570 |
| -sets the \exposid{state} to \exposid{running}, |
6571 |
| -otherwise leaves \exposid{state} unchanged. |
| 6569 | +If state is starting, |
| 6570 | +sets the state to running, |
| 6571 | +otherwise leaves state unchanged. |
6572 | 6572 | Then, equivalent to:
|
6573 | 6573 | \begin{codeblock}
|
6574 | 6574 | while (auto* op = @\exposid{pop-front}@()) {
|
|
6578 | 6578 |
|
6579 | 6579 | \pnum
|
6580 | 6580 | \remarks
|
6581 |
| -When \exposid{state} changes, it does so without introducing data races. |
| 6581 | +When state changes, it does so without introducing data races. |
6582 | 6582 | \end{itemdescr}
|
6583 | 6583 |
|
6584 | 6584 | \indexlibrarymember{finish}{run_loop}%
|
|
6589 | 6589 | \begin{itemdescr}
|
6590 | 6590 | \pnum
|
6591 | 6591 | \expects
|
6592 |
| -\exposid{state} is either \exposid{starting} or \exposid{running}. |
| 6592 | +state is either starting or running. |
6593 | 6593 |
|
6594 | 6594 | \pnum
|
6595 | 6595 | \effects
|
6596 |
| -Changes \exposid{state} to \exposid{finishing}. |
| 6596 | +Changes state to finishing. |
6597 | 6597 |
|
6598 | 6598 | \pnum
|
6599 | 6599 | \sync
|
|
0 commit comments