shithub: mc

ref: 0f3f41fae775b2647cd0cdaf0a9ef395c19b9878
dir: /lib/thread/ncpu+plan9.myr/

View raw version
use std

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

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