ref: 1d4b554015ba6bb9cce2902a648e4b5af2811df5
dir: /lib/thread/hookstd.myr/
use std use "mutex" pkg thread = ;; var memlck var netlck var envlck const __init__ = { memlck = mkmtx() netlck = mkmtx() envlck = mkmtx() std.__lockinit( \ (&memlck : void#), \ (&netlck : void#), \ (&envlck : void#), \ {mtx; mtxlock((mtx : mutex#))}, \ {mtx; mtxunlock((mtx : mutex#))} \ ) }