44 |
|
* be used together to define (partially) optimistic read-only methods |
45 |
|
* that are usually more efficient than ReadWriteLocks when they |
46 |
|
* apply. These methods should in general be structured as loops that |
47 |
< |
* await lock availablity, then read {@code volatile} fields into |
47 |
> |
* await lock availability, then read {@code volatile} fields into |
48 |
|
* local variables (and may further read other values derived from |
49 |
|
* these, for example the {@code length} of a {@code volatile} array), |
50 |
|
* and retry if the sequence number changed while doing so. |