shithub: mc

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