summaryrefslogtreecommitdiff
path: root/lib/thread/ncpu+plan9.myr
blob: a13725c206d4cf4dc88cd51d5577cd6fc504d0c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use std

pkg thread =
	const ncpu	: (-> int)
;;

const ncpu = {
	match std.intparse(std.getenvv("NPROC", "1"))
	| `std.Some n:	-> n
	| `std.None:	-> 1
	;;
}