I have a piece of code in Scala (using Java execution context) that spawns many threads. Also I have an 8 core CPU.
When the process runs it uses up all the juice my computer has and I cannot do anything else.
Is there a way I can limit the JVM to only 7 cores, or the Java execution context to 7 active threads?