It will be built on standard JVM concurrency primitives, in which case they will (ultimately) be scheduled for real OS threads. You cannot guarantee that the OS scheduler plans to schedule threads in a separate CPUS, although in most cases this is pretty likely.
Trying to guess what the parallel scheduler is going to do at runtime is a really bad idea. Just assume that you can use no more than as many processors as there are active threads, and donβt try to repeat the runtime check if you are not trying to perform a certain type of very low level optimization.
source share