class Concurrent::MutexSemaphore
def reduce_permits(reduction)
-
(nil)-
Raises:
-
(ArgumentError)- if `@free` - `@reduction` is less than zero -
(ArgumentError)- if `reduction` is not an integer or is negative
Parameters:
-
reduction(Fixnum) -- Number of permits to remove.
def reduce_permits(reduction) Utility::NativeInteger.ensure_integer_and_bounds reduction Utility::NativeInteger.ensure_positive reduction synchronize { @free -= reduction } nil end