Small polishing that addresses PR comments

This commit is contained in:
Chris Vest 2020-12-16 12:31:49 +01:00
parent f83e7fa618
commit 6b91751bea
2 changed files with 3 additions and 1 deletions

View File

@ -29,6 +29,7 @@ public final class BufRef extends BufHolder<BufRef> {
*/
public BufRef(Buf buf) {
super(buf);
// BufRef is meant to be atomic, so we need to add a fence to get the semantics of a volatile store.
VarHandle.fullFence();
}
@ -39,6 +40,7 @@ public final class BufRef extends BufHolder<BufRef> {
*/
public BufRef(Send<Buf> send) {
super(send);
// BufRef is meant to be atomic, so we need to add a fence to get the semantics of a volatile store.
VarHandle.fullFence();
}

View File

@ -50,7 +50,7 @@ class BifurcatedDrop implements Drop<MemSegBuf> {
}
@Override
public synchronized void drop(MemSegBuf buf) {
public void drop(MemSegBuf buf) {
int c;
int n;
do {