ref: 5927f8f8d3b4ab40d2aacfae4b3cbd593c5e7f01 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 }