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
dd38c8fa78
commit
1f5b74762b
@ -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