10492
10492
bool try_acquire_until(const chrono::time_point<Clock, Duration>& abs_time);
10493
10493
10494
10494
private:
10495
- ptrdiff_t counter; // \expos
10495
+ ptrdiff_t @ \exposid { counter}@ ; // \expos
10496
10496
};
10497
10497
}
10498
10498
\end {codeblock }
10522
10522
\begin {itemdescr }
10523
10523
\pnum
10524
10524
\returns
10525
- The maximum value of \tcode {counter}.
10525
+ The maximum value of \exposid {counter}.
10526
10526
This value is greater than or equal to \tcode {least_max_value}.
10527
10527
\end {itemdescr }
10528
10528
10539
10539
10540
10540
\pnum
10541
10541
\effects
10542
- Initializes \tcode {counter} with \tcode {desired}.
10542
+ Initializes \exposid {counter} with \tcode {desired}.
10543
10543
10544
10544
\pnum
10545
10545
\throws
@@ -10555,13 +10555,13 @@
10555
10555
\pnum
10556
10556
\expects
10557
10557
\tcode {update >= 0} is \tcode {true}, and
10558
- \tcode {update <= max() - counter} is \tcode {true}.
10558
+ \tcode {update <= max() - \exposid { counter} } is \tcode {true}.
10559
10559
10560
10560
\pnum
10561
10561
\effects
10562
- Atomically execute \tcode {counter += update}.
10562
+ Atomically execute \tcode {\exposid { counter} += update}.
10563
10563
Then, unblocks any threads
10564
- that are waiting for \tcode {counter} to be greater than zero.
10564
+ that are waiting for \exposid {counter} to be greater than zero.
10565
10565
10566
10566
\pnum
10567
10567
\sync
@@ -10586,11 +10586,11 @@
10586
10586
\begin {itemdescr }
10587
10587
\pnum
10588
10588
\effects
10589
- Attempts to atomically decrement \tcode {counter} if it is positive,
10589
+ Attempts to atomically decrement \exposid {counter} if it is positive,
10590
10590
without blocking.
10591
- If \tcode {counter} is not decremented, there is no effect and
10591
+ If \exposid {counter} is not decremented, there is no effect and
10592
10592
\tcode {try_acquire} immediately returns.
10593
- An implementation may fail to decrement \tcode {counter}
10593
+ An implementation may fail to decrement \exposid {counter}
10594
10594
even if it is positive.
10595
10595
\begin {note }
10596
10596
This spurious failure is normally uncommon, but
10603
10603
10604
10604
\pnum
10605
10605
\returns
10606
- \tcode {true} if \tcode {counter} was decremented, otherwise \tcode {false}.
10606
+ \tcode {true} if \exposid {counter} was decremented, otherwise \tcode {false}.
10607
10607
\end {itemdescr }
10608
10608
10609
10609
\indexlibrarymember {acquire}{counting_semaphore}%
10619
10619
\item Evaluates \tcode {try_acquire()}. If the result is \tcode {true}, returns.
10620
10620
\item
10621
10621
\indextext {block (execution)}%
10622
- Blocks on \tcode {*this} until \tcode {counter} is greater than zero.
10622
+ Blocks on \tcode {*this} until \exposid {counter} is greater than zero.
10623
10623
\end {itemize }
10624
10624
10625
10625
\pnum
10652
10652
\item
10653
10653
\indextext {block (execution)}%
10654
10654
Blocks on \tcode {*this}
10655
- until \tcode {counter} is greater than zero or until the timeout expires.
10655
+ until \exposid {counter} is greater than zero or until the timeout expires.
10656
10656
If it is unblocked by the timeout expiring, returns \tcode {false}.
10657
10657
\end {itemize }
10658
10658
The timeout expires\iref {thread.req.timing }
0 commit comments