public interface Balancer
acquirePermit()
simply returns and a new test is scheduled
by Scheduler.schedule(Runnable)
in the current runner. Otherwise waiting for a release.
One permit is released as soon as the child thread has finished.Modifier and Type | Method and Description |
---|---|
boolean |
acquirePermit()
Acquires a permit from this balancer, blocking until one is available.
|
void |
releaseAllPermits() |
void |
releasePermit()
Releases a permit, returning it to the balancer.
|
boolean acquirePermit()
true
if current thread is NOT interrupted
while waiting for a permit.void releasePermit()
void releaseAllPermits()
Copyright © 2004–2018 The Apache Software Foundation. All rights reserved.