If the loop exited, it might be due to an interruption or a time out. If you like, you
can call this to pick up the work again,
If it returns false, the work is indeed all finished and you should not re-enter the loop.
autorange = HttpRequestsAsTheyComplete(10.seconds, your_requests);
process_loop: foreach(req; range) {
// process req
}
// make sure we weren't interrupted because the user requested we cancel!// but then try to re-enter the range if possibleif(!user_quit && range.reenter()) {
// there's still something unprocessed in there// range.reenter returning true means it is no longer// empty, so we should try to loop over it againgotoprocess_loop; // re-enter the loop
}
If the loop exited, it might be due to an interruption or a time out. If you like, you can call this to pick up the work again,
If it returns false, the work is indeed all finished and you should not re-enter the loop.