shithub: mc

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