It would be great if the API supported being able to set the name and uncaughtExceptionHandler of the threads that are created with the Virtual Threads factory.
The Java21 API supports thread customization in the following way: Thread.ofVirtual().name("my-custom-vt-name").uncaughtExceptionHandler(handler).factory();.
I think the easiest way would be for the ExecutorTool to support the creation of the ThreadFactory and to be able to set at least the name and the uncaughtExceptionHandler, for example: ExecutorTool.newThreadFactory().name("my-custom-name").uncaughtExceptionHandler(customHandler).factory()
It would be great if the API supported being able to set the name and uncaughtExceptionHandler of the threads that are created with the Virtual Threads factory.
The Java21 API supports thread customization in the following way:
Thread.ofVirtual().name("my-custom-vt-name").uncaughtExceptionHandler(handler).factory();
.I think the easiest way would be for the ExecutorTool to support the creation of the ThreadFactory and to be able to set at least the name and the uncaughtExceptionHandler, for example:
ExecutorTool.newThreadFactory().name("my-custom-name").uncaughtExceptionHandler(customHandler).factory()