belugabehr commented on pull request #1275:
URL: https://github.com/apache/hive/pull/1275#issuecomment-662082780
```
public static void main(String[] args) throws IOException
{
ExecutorService service = Executors.newFixedThreadPool(2);
CompletionService<Void> completionService = new
ExecutorCompletionService<>(service);
for (int i = 0; i < 10; i++)
{
final int t = i;
completionService.submit(() -> {
clean("File" + t);
return null;
});
}
for (int i = 0; i < 10; ++i) {
try {
completionService.take().get();
} catch (Exception ignore) {}
}
}
public static String clean(String path)
{
return "Cleaned: " + path;
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]