Semaphore
概述
共享鎖,運(yùn)行多個(gè)線程同時(shí)臨界區(qū)
主要接口
public void acquire()
public void acquireUninterruptibly()
public boolean tryAcquire()
public boolean tryAcquire(long timeout, TimeUnit unit)
public void release()
共享鎖,運(yùn)行多個(gè)線程同時(shí)臨界區(qū)
public void acquire()
public void acquireUninterruptibly()
public boolean tryAcquire()
public boolean tryAcquire(long timeout, TimeUnit unit)
public void release()