<div dir="ltr">I'm using `Executors.newThreadPerTaskExecutor` where I need a set of independent actors(threads) to interact with each other. Right now, everytime I start a new task I have to bind all my scoped values(just one at the moment), but in the general case, it would be useful to have an implementation of ExecutorService that captures all(or some) ScopeValues at task submission point(and maybe at ES construction point).<div><br></div><div>```</div><div>Task task  = ....</div><div>executorService.submit(() -> {<br>  ScopedValue.where(AsyncScheduledTask.VALUE, task.asRunning())<br>    .where(TaskControlImpl.VALUE, new TaskControlImpl(task))<br>    .call(() -> {</div><div>```</div><div><br></div><div>It would be nice to have `Exuectors.scopeCapturing(ExecutorService delegate, ScopeValues<?>... values)` or even without the varargs. Just capture everything(if performance is not an issue).</div><div><br></div><div>I can't speak for people writing web servers or frameworks. But I think it would be useful there as well.</div><div><br></div><div>In addition it will make ScopedValue the universal context propagation mechanism for both structured and unstructured cases. The current solution used by Spring and some other libraries `<a href="https://github.com/micrometer-metrics/context-propagation" target="_blank">https://github.com/micrometer-metrics/context-propagation`</a>.</div><div><br></div><div>Regards</div></div>