public class Semaphore extends Object
Constructor and Description |
---|
Semaphore()
Standard constructor.
|
public void acquire() throws InterruptedException
InterruptedException
- if the java.util.concurrent.Semaphore is interrupted.The difference is that this tries to acquire all available permits if there are any and 1 if there are none.
public void release()
Copyright © 2016–2019. All rights reserved.