Skip to content

Commit

Permalink
+ doc
Browse files Browse the repository at this point in the history
  • Loading branch information
q3769 committed Sep 23, 2023
1 parent 87725fa commit 73cd37a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,17 @@ public class MessageConsumer {
advantage over the thread-affinity API style, at the trade-off of lesser syntax and semantic richness than the
JDK [ExecutorService](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html).
- The default ConseqExecutor instance uses `Executors.newVirtualThreadPerTaskExecutor()` to facilitate the async
operations
operations since Java 21. With earlier JDK and conseq4j versions, the default instance uses a `ForkJoinPool` with
parallelism equal to JVM
run-time's [availableProcessors](https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#availableProcessors--):
```jshelllanguage
ConseqExecutor.instance()
```
When the concurrency can be customized, ConseqExecutor instance uses a `ForkJoinPool` of such concurrency/parallelism
If the concurrency is customized, ConseqExecutor instance uses a `ForkJoinPool` of such concurrency/parallelism:
```jshelllanguage
ConseqExecutor.instance(10)
```
- The `ConseqExecutor` instance can also use a fully-customized `ExecutorService`:
- The `ConseqExecutor` instance can also use a fully-customized `ExecutorService` to power its async operations:

`ConseqExecutor.instance(ExecutorService workerExecutorService)`

Expand Down

0 comments on commit 73cd37a

Please sign in to comment.