ForkJoinPool forkJoinPool = new ForkJoinPool(8);
forkJoinPool.submit(() ->
urls.parallelStream().forEach(u ->
{
LOG.debug("Page: " + u + usersResponse.pages.total_pages);
try
{
String r = <Send getRequest>
}
catch (Exception e)
{
LOG.error(e);
}
})
).get();