资源加载中... loading...

acquire

acquire()函数用于请求一个线程锁(加锁)。

acquire()

范例可以参考ThreadCondition.notify()章节的内容。

在使用wait()之前需要请求当前条件对象的线程锁(加锁)。

{@fun/Threads/ThreadCondition/notify notify}, {@fun/Threads/ThreadCondition/notifyAll notifyAll}, {@fun/Threads/ThreadCondition/wait wait}, {@fun/Threads/ThreadCondition/release release}

wait release