Code example for Semaphore

Methods: availablePermits

0
	 
	/** 
	* Test if the lock is available, without blocking. 
	*/	 
	public boolean available() { 
		return semaphore.availablePermits() > 0;
	} 
}