mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8211283: Miscellaneous changes imported from jsr166 CVS 2018-11
Reviewed-by: martin, chegar
This commit is contained in:
parent
5a5aa52772
commit
53d3a4f50c
14 changed files with 218 additions and 213 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue