8278031: MultiThreadedRefCounter should not use relaxed atomic decrement
Reviewed-by: kbarrett
This commit is contained in:
parent
8d190dd003
commit
d14f06a963
@ -116,7 +116,11 @@ class MultiThreadedRefCounter {
|
||||
}
|
||||
|
||||
bool dec() const {
|
||||
return 0 == Atomic::sub(&_refs, 1, memory_order_relaxed);
|
||||
if (0 == Atomic::sub(&_refs, 1, memory_order_release)) {
|
||||
OrderAccess::acquire();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
intptr_t current() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user