Skip to content

Commit

Permalink
Replace 'Thread.ofVirtual().start()' with 'Thread.startVirtualThread(…
Browse files Browse the repository at this point in the history
…)' (#907)

There's no need to use the builder when all we need is to simply start a `Thread`
  • Loading branch information
pivovarit authored Aug 21, 2024
1 parent 7b940a8 commit 9ea73ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/pivovarit/collectors/Dispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static <T> Dispatcher<T> virtual(int permits) {

void start() {
if (!started.getAndSet(true)) {
Thread.ofVirtual().start(() -> {
Thread.startVirtualThread(() -> {
try {
while (true) {
try {
Expand Down

0 comments on commit 9ea73ce

Please sign in to comment.