1 |
|
/* |
2 |
< |
* Written by members of JCP JSR-166 Expert Group and released to the |
3 |
< |
* public domain. Use, modify, and redistribute this code in any way |
4 |
< |
* without acknowledgement. Other contributors include Andrew Wright, |
5 |
< |
* Jeffrey Hayes, Pat Fischer, Mike Judd. |
2 |
> |
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
> |
* Expert Group and released to the public domain, as explained at |
4 |
> |
* http://creativecommons.org/licenses/publicdomain |
5 |
> |
* Other contributors include Andrew Wright, Jeffrey Hayes, |
6 |
> |
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
8 |
|
|
9 |
|
|
87 |
|
Callable c = new StringTask(); |
88 |
|
ecs.submit(c); |
89 |
|
Future f = ecs.take(); |
90 |
< |
assert(f.isDone()); |
90 |
> |
assertTrue(f.isDone()); |
91 |
|
} catch (Exception ex) { |
92 |
|
unexpectedException(); |
93 |
|
} finally { |
127 |
|
for (;;) { |
128 |
|
Future f = ecs.poll(); |
129 |
|
if (f != null) { |
130 |
< |
assert(f.isDone()); |
130 |
> |
assertTrue(f.isDone()); |
131 |
|
break; |
132 |
|
} |
133 |
|
} |
150 |
|
ecs.submit(c); |
151 |
|
Future f = ecs.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS); |
152 |
|
if (f != null) |
153 |
< |
assert(f.isDone()); |
153 |
> |
assertTrue(f.isDone()); |
154 |
|
} catch (Exception ex) { |
155 |
|
unexpectedException(); |
156 |
|
} finally { |