summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-09-12 20:05:45 -0700
committerOri Bernstein <ori@eigenstate.org>2018-09-12 20:05:45 -0700
commit63dc379b326e11226c34c807f210bb92af6fe602 (patch)
treedc2410a3326de9c2a71b72b6dfbb06af884542b4
parent28407c92feaf5fc5f5925e0e05bec4508b172ee2 (diff)
downloadmc-master.tar.gz
Wait can't always be called from other procs.HEADmaster
-rw-r--r--lib/thread/test/do.myr6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/thread/test/do.myr b/lib/thread/test/do.myr
index e2e64e8..764ab1c 100644
--- a/lib/thread/test/do.myr
+++ b/lib/thread/test/do.myr
@@ -2,16 +2,16 @@ use std
use thread
const main = {
- match std.espork(["echo", "hello"][:])
+ match std.espork(["/bin/echo", "hello"][:])
| `std.Err e:
std.fatal("could not spork\n")
| `std.Ok (pid, in, out, err):
std.close(in)
- var w = thread.do({;-> std.wait(pid)})
var o = thread.do({;-> std.fslurp(out)})
var e = thread.do({;-> std.fslurp(err)})
+ var w = std.wait(pid)
- match thread.futget(w)
+ match w
| `std.Wsuccess: /* ok */
| bad: std.fatal("bad wait: {}\n", bad)
;;