175 |
|
try { |
176 |
|
if (!timed) |
177 |
|
trip.await(); |
178 |
< |
else if (nanos > 0) |
178 |
> |
else if (nanos > 0L) |
179 |
|
nanos = trip.awaitNanos(nanos); |
180 |
|
} catch (InterruptedException ie) { |
181 |
|
breakBarrier(); |
189 |
|
if (g < generation) |
190 |
|
return index; |
191 |
|
|
192 |
< |
if (timed && nanos <= 0) { |
192 |
> |
if (timed && nanos <= 0L) { |
193 |
|
breakBarrier(); |
194 |
|
throw new TimeoutException(); |
195 |
|
} |
297 |
|
*/ |
298 |
|
public int await() throws InterruptedException, BrokenBarrierException { |
299 |
|
try { |
300 |
< |
return dowait(false, 0); |
300 |
> |
return dowait(false, 0L); |
301 |
|
} catch (TimeoutException toe) { |
302 |
|
throw new Error(toe); // cannot happen; |
303 |
|
} |