Skip to content

Commit

Permalink
use AtomicLong.lazySet() to update the timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
lorban committed Dec 9, 2020
1 parent fe6f1df commit 647cae2
Showing 1 changed file with 0 additions and 2 deletions.
Expand Up @@ -197,7 +197,6 @@ public ByteBuffer acquire(boolean direct)

public void release(ByteBuffer buffer)
{
// This could be changed to a setOpaque() call on JDK 9+.
_lastUpdate.lazySet(System.nanoTime());
BufferUtil.clear(buffer);
if (_size == null)
Expand Down Expand Up @@ -253,7 +252,6 @@ int size()

long getLastUpdate()
{
// This could be changed to a getOpaque() call on JDK 9+.
return _lastUpdate.get();
}

Expand Down

0 comments on commit 647cae2

Please sign in to comment.