Skip to content

Commit cb248de

Browse files
committed
.
1 parent 80fb42c commit cb248de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/pages/1 - Cask - a Scala HTTP micro-framework.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ Cask can support using Virtual Threads to handle the request out of the box, you
476476
1. You can change the default scheduler of the carrier threads with `cask.internal.Util.createVirtualThreadExecutor` method, but keep in mind, that's not officially supported by JDK for now.
477477
2. You can supply your own `Executor` by override the `handlerExecutor()` method in your `cask.Main` object, which will be called only once when the server starts.
478478
3. You can use `jdk.internal.misc.Blocker`'s `begin` and `end` methods to help the `ForkJoinPool` when needed.
479+
4. You can use `Util.createVirtualThreadScheduler` to create separate `ForkJoinPool` as scheduler for the virtual threads.
479480
480481
**NOTE**:
481482
1. If your code is CPU-bound, you should not use virtual threads, because it will not improve the performance, but will increase the overhead.

0 commit comments

Comments
 (0)