Class VirtualThreadWorkerPool.Builder
java.lang.Object
express.mvp.myra.transport.VirtualThreadWorkerPool.Builder
- Enclosing class:
VirtualThreadWorkerPool
Builder for creating
VirtualThreadWorkerPool instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the worker pool.daemon(boolean daemon) Sets whether worker threads should be daemon threads.namePrefix(String namePrefix) Sets the name prefix for worker threads.
-
Method Details
-
namePrefix
Sets the name prefix for worker threads.- Parameters:
namePrefix- the prefix for thread names- Returns:
- this builder
-
daemon
Sets whether worker threads should be daemon threads.Note: Virtual threads don't truly support daemon flag - they don't prevent JVM shutdown regardless.
- Parameters:
daemon- true for daemon threads- Returns:
- this builder
-
build
Builds the worker pool.- Returns:
- a new VirtualThreadWorkerPool
-