By default (go..) will use twice the number of cores + 42 threads for the thread pool. Is there any way I can set the number of threads, or number of CPUs that the code can use, through setting an environment variable or sth?
On linux machine I can set number of CPU using taskset, e.g.
taskset -c 0,1 my_Java_or_Clojure_program
, although taskset seems not effective on the number returned by (-> (java.lang.Runtime/getRuntime) .availableProcessors)
.