223 |
|
int s; // the odd construction reduces lock bias effects |
224 |
|
while ((s = status) >= 0) { |
225 |
|
try { |
226 |
< |
synchronized(this) { |
226 |
> |
synchronized (this) { |
227 |
|
if (UNSAFE.compareAndSwapInt(this, statusOffset, s,SIGNAL)) |
228 |
|
wait(); |
229 |
|
} |
243 |
|
int s; |
244 |
|
if ((s = status) >= 0) { |
245 |
|
try { |
246 |
< |
synchronized(this) { |
246 |
> |
synchronized (this) { |
247 |
|
if (UNSAFE.compareAndSwapInt(this, statusOffset, s,SIGNAL)) |
248 |
|
wait(millis, 0); |
249 |
|
} |
261 |
|
private void externalAwaitDone() { |
262 |
|
int s; |
263 |
|
while ((s = status) >= 0) { |
264 |
< |
synchronized(this) { |
264 |
> |
synchronized (this) { |
265 |
|
if (UNSAFE.compareAndSwapInt(this, statusOffset, s, SIGNAL)){ |
266 |
|
boolean interrupted = false; |
267 |
|
while (status >= 0) { |
698 |
|
long ms = nt / 1000000; |
699 |
|
int ns = (int) (nt % 1000000); |
700 |
|
try { |
701 |
< |
synchronized(this) { |
701 |
> |
synchronized (this) { |
702 |
|
if (status >= 0) |
703 |
|
wait(ms, ns); |
704 |
|
} |