shithub: mc

ref: 10009f394344f655190934e9c5d654b9bce37032
dir: /lib/thread/ncpu+plan9.myr/

View raw version
use std

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

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