post overloads
Declared in <folly/synchronization/LifoSem.h>
Silently saturates if value is already 2^32-1
bool
post();
» more...
Equivalent to n calls to post(), except may be much more efficient. At any point in time at which the semaphore's value would exceed 2^32-1 if tracked with infinite precision, it may be silently truncated to 2^32-1. This saturation is not guaranteed to be exact, although it is guaranteed that overflow won't result in wrap-around. There would be a substantial performance and complexity cost in guaranteeing exact saturation (similar to the cost of maintaining linearizability near the zero value, but without as much of a benefit).
void
post(uint32_t n);
» more...