try {
final String url = queue.take();
ScopedValue.runWhere(Scrape.URL, url, scrape);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
In that case this is using a ScopedValue<String> which can be used in the whole Scrape without recalling the supplier.