ref: f995117702dd77f832b2a70ce94c4f5c9848efd4 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 }