1 obj worker(chan[int] c) {
8 io fn do_work(chan[int] c) {
11 let worker w = worker(c);
12 log "constructed worker";
14 log "destructed worker";
16 // Deadlock-condition not handled properly yet, need to avoid
17 // exiting the child early.
24 let port[int] p = port();
25 log "spawning worker";
26 auto w = spawn do_work(chan(p));
28 log "parent waiting for shutdown";
32 log "int is OK, child-dtor ran as expected";