- timeout
- the maximum time to wait for a permit
- unit
- the time unit of the timeout argument
Documentation for this section has not yet been entered.
Type Reason Java.Lang.InterruptedException if the current thread is interrupted
Acquires a permit from this semaphore, if one becomes available within the given waiting time and the current thread has not been Java.Lang.Thread.Interrupt.
Acquires a permit, if one is available and returns immediately, with the value true, reducing the number of available permits by one.
If no permit is available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happens:
If a permit is acquired then the value true is returned.
If the current thread:
If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all.