summaryrefslogtreecommitdiff
path: root/lib/thread/ncpu+plan9.myr
blob: 25d09cb3c1e4414f9226b9e9719999d199792b8f (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", ""))
	| `std.Some n:	-> n
	| `std.None:	-> 1
	;;
}