8211283: Miscellaneous changes imported from jsr166 CVS 2018-11

Reviewed-by: martin, chegar
This commit is contained in:
Doug Lea 2018-11-28 15:25:14 -08:00
parent 5a5aa52772
commit 53d3a4f50c
14 changed files with 218 additions and 213 deletions

View file

@ -564,8 +564,8 @@ public class Exchanger<V> {
Object item = (x == null) ? NULL_ITEM : x; // translate null args
if (((a = arena) != null ||
(v = slotExchange(item, false, 0L)) == null) &&
((Thread.interrupted() || // disambiguates null return
(v = arenaExchange(item, false, 0L)) == null)))
(Thread.interrupted() || // disambiguates null return
(v = arenaExchange(item, false, 0L)) == null))
throw new InterruptedException();
return (v == NULL_ITEM) ? null : (V)v;
}
@ -620,8 +620,8 @@ public class Exchanger<V> {
long ns = unit.toNanos(timeout);
if ((arena != null ||
(v = slotExchange(item, true, ns)) == null) &&
((Thread.interrupted() ||
(v = arenaExchange(item, true, ns)) == null)))
(Thread.interrupted() ||
(v = arenaExchange(item, true, ns)) == null))
throw new InterruptedException();
if (v == TIMED_OUT)
throw new TimeoutException();