If I create an executor service of virtual threads
Executors.newVirtualThreadPerTaskExecutor()
I understand that each tasks is run over a virtual thread. These virtual threads are scheduled (hopefully interleaved) over platform threads.
How many platform threads are used here? I don't see any other API to specify the number of threads I want. I am running it on Macbook M1 Pro with Java 21.
Thread
– ConsueloconsuetudeThread.setPriority
Javadoc: The priority of a virtual thread is always {@link Thread#NORM_PRIORITY} and {@code newPriority} is ignored. However, keeping in mind that carrier threads may also have their own priorities, it deserves to be a good separate question. In general, your question is good. Upvoted. – Curtice