do {
change = false;
for (Future future : futures) {
if(future.isDone()) change = true;
}
if(!change) Thread.sleep(10);
count++;
}
while(!change && (count < countLimit));
List data = new ArrayList<>();
if(count < countLimit)
{
for (Future next : futures) {
if (!next.isDone()) {
......
do while -> do runs for 1 time after while is false
do { change = false; for (Future future : futures) { if(future.isDone()) change = true; } if(!change) Thread.sleep(10); count++; } while(!change && (count < countLimit)); List data = new ArrayList<>();
if(count < countLimit)
{
for (Future next : futures) {
if (!next.isDone()) {
......
do while -> do runs for 1 time after while is false