Semaphore

概述

共享锁,运行多个线程同时临界区

主要接口

public void acquire()
public void acquireUninterruptibly()
public boolean tryAcquire()
public boolean tryAcquire(long timeout, TimeUnit unit)
public void release() 

使用

网友评论