tinygo/src/runtime/debug.go
2022-03-19 19:09:20 +01:00

20 строки
499 Б
Go

package runtime
// NumCPU returns the number of logical CPUs usable by the current process.
//
// The set of available CPUs is checked by querying the operating system
// at process startup. Changes to operating system CPU allocation after
// process startup are not reflected.
func NumCPU() int {
return 1
}
// Stub for NumCgoCall, does not return the real value
func NumCgoCall() int {
return 0
}
// Stub for NumGoroutine, does not return the real value
func NumGoroutine() int {
return 1
}