shithub: mc

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