shithub: mc

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