A new build and a new structured concurrency API

Ignaz Birnstingl ignazb at gmail.com
Thu Nov 18 20:09:31 UTC 2021

Hi Ron,

regarding the StructuredExecutor:
The design of this API seems to be very VirtualThreads-specific. Did you  
consider using an ExecutorService instead of - or in addition to - a  
ThreadFactory for dealing with tasks?
I could see these benefits:
(a) With an ExecutorService you could regulate the concurrency level by  
using a thread pooling ExecutorService - or use a  
ThreadPerTaskExecutorService like what is done with the ThreadFactory API.
(b) If the whole structured thread dump thing would be moved to  
ExecutorService, older applications which use ExecutorServices could  
benefit from it, too. I'm not sure if this is technically possible, though.


More information about the loom-dev mailing list