ref: a4eb9c0aca8ae4adb6c50133ba26bbd250ae934d dir: /lib/thread/do.myr/
use std use "future" use "spawn" pkg thread = generic do : (fn : (-> @a) -> future(@a)#) ;; generic do = {fn var r r = mkfut() spawn({; futput(r, fn()) }) -> r }