public class BinaryLatch extends Object
The main difference is that instances of this specialized latch implementation are much quicker to allocate and construct. Each instance also takes up less memory on the heap, and enqueueing wait nodes on the latch is faster.
There are two reasons why this class is faster to construct: 1. it performs no volatile write during its construction, and 2. it does not need to allocate an internal Sync object, like CountDownLatch does.
| Constructor and Description |
|---|
BinaryLatch() |
| Modifier and Type | Method and Description |
|---|---|
void |
await()
Wait for the latch to be released, blocking the current thread if necessary.
|
void |
release()
Release the latch, thereby unblocking all current and future calls to
await(). |
public void release()
await().public void await()
This method returns immediately if the latch has already been released.
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.