amaembo / streamex

Enhancing Java Stream API
Apache License 2.0
2.17k stars 248 forks source link

Support for virtual threads in Java 21 #270

Open oleg-smith opened 9 months ago

oleg-smith commented 9 months ago

Hello, I want to use Java Virtual Threads for such code:

StreamEx.of().parallel(executor).

Now exectutor can only be a ForkJoinPool.

Is there a way to pass Executors.newVirtualThreadExecutor() or a plan to add support for it?

loordgek commented 8 months ago

https://github.com/amaembo/streamex/issues/181

can you set ForkJoinWorkerThread to be virtual??