runtime: implement NumCPU for -scheduler=threads

For the threads scheduler, it makes sense to have NumCPU available.
For all other schedulers, the number of available CPUs is practically
limited to one by the scheduler (even though the system might have more
CPUs).
This commit is contained in:
Ayke van Laethem
2025-01-21 11:10:18 +01:00
committed by Ron Evans
parent 25b83920b6
commit 02c5c4213c
9 changed files with 36 additions and 13 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ import (
// builder.Library struct but that's hard to do since we want to know the
// library path in advance in several places).
var libVersions = map[string]int{
"musl": 2,
"musl": 3,
}
// Config keeps all configuration affecting the build in a single struct.