mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-10 23:18:45 +00:00
Merge
This commit is contained in:
commit
781e5085de
@ -1222,8 +1222,10 @@ public abstract class AbstractQueuedLongSynchronizer
|
||||
// The correctness of this depends on head being initialized
|
||||
// before tail and on head.next being accurate if the current
|
||||
// thread is first in queue.
|
||||
Node h, s;
|
||||
return (h = head) != tail &&
|
||||
Node t = tail; // Read fields in reverse initialization order
|
||||
Node h = head;
|
||||
Node s;
|
||||
return h != t &&
|
||||
((s = h.next) == null || s.thread != Thread.currentThread());
|
||||
}
|
||||
|
||||
|
||||
@ -1445,8 +1445,10 @@ public abstract class AbstractQueuedSynchronizer
|
||||
// The correctness of this depends on head being initialized
|
||||
// before tail and on head.next being accurate if the current
|
||||
// thread is first in queue.
|
||||
Node h, s;
|
||||
return (h = head) != tail &&
|
||||
Node t = tail; // Read fields in reverse initialization order
|
||||
Node h = head;
|
||||
Node s;
|
||||
return h != t &&
|
||||
((s = h.next) == null || s.thread != Thread.currentThread());
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user