shithub: mc

ref: e1f5c300e0985422ef62acf841b43614fd58937b
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
	;;
}