1049310493 bool try_acquire_until(const chrono::time_point<Clock, Duration>& abs_time);
1049410494
1049510495 private:
10496- ptrdiff_t counter; // \expos
10496+ ptrdiff_t @ \exposid { counter}@ ; // \expos
1049710497 };
1049810498}
1049910499\end {codeblock }
1052310523\begin {itemdescr }
1052410524\pnum
1052510525\returns
10526- The maximum value of \tcode {counter}.
10526+ The maximum value of \exposid {counter}.
1052710527This value is greater than or equal to \tcode {least_max_value}.
1052810528\end {itemdescr }
1052910529
1054010540
1054110541\pnum
1054210542\effects
10543- Initializes \tcode {counter} with \tcode {desired}.
10543+ Initializes \exposid {counter} with \tcode {desired}.
1054410544
1054510545\pnum
1054610546\throws
@@ -10556,13 +10556,13 @@
1055610556\pnum
1055710557\expects
1055810558\tcode {update >= 0} is \tcode {true}, and
10559- \tcode {update <= max() - counter} is \tcode {true}.
10559+ \tcode {update <= max() - \exposid { counter} } is \tcode {true}.
1056010560
1056110561\pnum
1056210562\effects
10563- Atomically execute \tcode {counter += update}.
10563+ Atomically execute \tcode {\exposid { counter} += update}.
1056410564Then, unblocks any threads
10565- that are waiting for \tcode {counter} to be greater than zero.
10565+ that are waiting for \exposid {counter} to be greater than zero.
1056610566
1056710567\pnum
1056810568\sync
@@ -10587,11 +10587,11 @@
1058710587\begin {itemdescr }
1058810588\pnum
1058910589\effects
10590- Attempts to atomically decrement \tcode {counter} if it is positive,
10590+ Attempts to atomically decrement \exposid {counter} if it is positive,
1059110591without blocking.
10592- If \tcode {counter} is not decremented, there is no effect and
10592+ If \exposid {counter} is not decremented, there is no effect and
1059310593\tcode {try_acquire} immediately returns.
10594- An implementation may fail to decrement \tcode {counter}
10594+ An implementation may fail to decrement \exposid {counter}
1059510595even if it is positive.
1059610596\begin {note }
1059710597This spurious failure is normally uncommon, but
1060410604
1060510605\pnum
1060610606\returns
10607- \tcode {true} if \tcode {counter} was decremented, otherwise \tcode {false}.
10607+ \tcode {true} if \exposid {counter} was decremented, otherwise \tcode {false}.
1060810608\end {itemdescr }
1060910609
1061010610\indexlibrarymember {acquire}{counting_semaphore}%
1062010620\item Evaluates \tcode {try_acquire()}. If the result is \tcode {true}, returns.
1062110621\item
1062210622\indextext {block (execution)}%
10623- Blocks on \tcode {*this} until \tcode {counter} is greater than zero.
10623+ Blocks on \tcode {*this} until \exposid {counter} is greater than zero.
1062410624\end {itemize }
1062510625
1062610626\pnum
1065310653\item
1065410654 \indextext {block (execution)}%
1065510655 Blocks on \tcode {*this}
10656- until \tcode {counter} is greater than zero or until the timeout expires.
10656+ until \exposid {counter} is greater than zero or until the timeout expires.
1065710657 If it is unblocked by the timeout expiring, returns \tcode {false}.
1065810658\end {itemize }
1065910659The timeout expires\iref {thread.req.timing }
0 commit comments