-
Notifications
You must be signed in to change notification settings - Fork 7
timed_semaphore try_acquire_until
Alairion edited this page May 8, 2021
·
6 revisions
nes::timed_semaphore::try_acquire_until
template<typename Clock, typename Duration>
(1) bool try_acquire_until(const std::chrono::time_point<Clock, Duration>& time_point);
- Checks if a resource is available until a specified time point, and if that is the case decrements the resource counter.
Note: The implementation may not take care of Clock
adjustment.
Name | Description |
---|---|
time_point |
The maximum time point to wait until |
- Returns
true
if the resource counter was successfully decremented, returnsfalse
otherwise.
- May throw an exception depending on the implementation behaviour.
- On Windows, calls
WaitForSingleObject
On Posix systems, callssem_timedwait