Correct ConcurrentHashMapV8 bitwise arithmetic
Previously ConcurrentHashMapV8 evaulated ((x | 1) == 0), an expression that always returned false. This commit brings Netty closer to the Java 8 implementation.
This commit is contained in:
parent
7d04136734
commit
aa5306adc1
@ -2672,7 +2672,7 @@ public class ConcurrentHashMapV8<K,V>
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ((s | WAITER) == 0) {
|
||||
else if ((s & WAITER) == 0) {
|
||||
if (U.compareAndSwapInt(this, LOCKSTATE, s, s | WAITER)) {
|
||||
waiting = true;
|
||||
waiter = Thread.currentThread();
|
||||
|
Loading…
Reference in New Issue
Block a user