コード例 #1
0
ファイル: LimitLatch.java プロジェクト: imace/coffee
 /**
  * Acquires a shared latch if one is available or waits for one if no shared latch is current
  * available.
  */
 public void countUpOrAwait() throws InterruptedException {
   sync.acquireSharedInterruptibly(1);
 }
コード例 #2
0
 public void await() throws InterruptedException {
   sync.acquireSharedInterruptibly(0);
 }