Advertisement
Guest User

Untitled

a guest
Mar 17th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. my Supply $out-supply = supply {
  2. my Proc::Async $proc-async .= new(</bin/ls -l>);
  3. $proc-async.stdout.lines.tap({ say 'forwarding ' ~ $_; emit($_) });
  4. my Proc $done-proc = await $proc-async.start;
  5. say 'process exited';
  6. if $done-proc.exitcode != 0 {
  7. say 'bad exit code';
  8. emit(
  9. Failure.new(
  10. "Process exited with non-zero exit code: {$done-proc.exitcode}"
  11. )
  12. );
  13. }
  14. say 'done';
  15. }
  16.  
  17. say 'i have control';
  18. say $out-supply.list.Array;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement