Skip to content

Commit

Permalink
AtomicLongPosition plain methods fix. (#322)
Browse files Browse the repository at this point in the history
The methods get and set, which have plain semantics, where calling
AtomicLong.get/set which  have volatile semantics.

So they were calling methods with were more thread-safe than needed.
  • Loading branch information
pveentjer authored Feb 3, 2025
1 parent c5ad4a1 commit 80f1328
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public int id()
*/
public long get()
{
return value.get();
return value.getPlain();
}

/**
Expand All @@ -99,7 +99,7 @@ public long getAcquire()
*/
public void set(final long value)
{
this.value.lazySet(value);
this.value.setPlain(value);
}

/**
Expand Down

0 comments on commit 80f1328

Please sign in to comment.