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() 

使用

網(wǎng)友評(píng)論

<u id="45dg5"></u>

    <progress id="45dg5"><ol id="45dg5"></ol></progress>