ref: 74d91a0021de012908cfdb35fb61a1473a376130 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 }