Small polishing that addresses PR comments
This commit is contained in:
parent
f83e7fa618
commit
6b91751bea
@ -29,6 +29,7 @@ public final class BufRef extends BufHolder<BufRef> {
|
|||||||
*/
|
*/
|
||||||
public BufRef(Buf buf) {
|
public BufRef(Buf buf) {
|
||||||
super(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();
|
VarHandle.fullFence();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,6 +40,7 @@ public final class BufRef extends BufHolder<BufRef> {
|
|||||||
*/
|
*/
|
||||||
public BufRef(Send<Buf> send) {
|
public BufRef(Send<Buf> send) {
|
||||||
super(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();
|
VarHandle.fullFence();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class BifurcatedDrop implements Drop<MemSegBuf> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void drop(MemSegBuf buf) {
|
public void drop(MemSegBuf buf) {
|
||||||
int c;
|
int c;
|
||||||
int n;
|
int n;
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user