Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Proc::Async: say, write and print return promises
  • Loading branch information
moritz committed Jan 25, 2015
1 parent 83a1c78 commit bacbf30
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Type/Proc/Async.pod
Expand Up @@ -37,7 +37,7 @@ An example that opens an external program for writing:
use v6;
my $prog = Proc::Async.new(:w, 'hexdump', '-C');
my $promise = $prog.start;
$prog.write(Buf.new(12, 42));
await $prog.write(Buf.new(12, 42));
$prog.close-stdin;
await $promise;
Expand Down Expand Up @@ -128,6 +128,9 @@ C<new> method.
Write the binary data in C<$b> to the standard input stream of the external
program.
Returns a L<Promise|/type/Promise> that will be kept once the data has fully
landed in the input buffer of the external program.
The C<Proc::Async> object must be created for writing (with
C<Proc::Async.new(:w, $path, @args)>). Otherwise an
L<X::Proc::Async::OpenForWriting> exception will the thrown.
Expand All @@ -142,6 +145,9 @@ L<X::Proc::Async::MustBeStarted> exception is thrown.
Write the text data in C<$str> to the standard input stream of the external
program, encoding it as UTF-8.
Returns a L<Promise|/type/Promise> that will be kept once the data has fully
landed in the input buffer of the external program.
The C<Proc::Async> object must be created for writing (with
C<Proc::Async.new(:w, $path, @args)>). Otherwise an
L<X::Proc::Async::OpenForWriting> exception will the thrown.
Expand All @@ -156,6 +162,9 @@ L<X::Proc::Async::MustBeStarted> exception is thrown.
Write the text data in C<$str> and a newline to the standard input stream of the external
program, encoding it as UTF-8.
Returns a L<Promise|/type/Promise> that will be kept once the data has fully
landed in the input buffer of the external program.
The C<Proc::Async> object must be created for writing (with
C<Proc::Async.new(:w, $path, @args)>). Otherwise an
L<X::Proc::Async::OpenForWriting> exception will the thrown.
Expand Down

0 comments on commit bacbf30

Please sign in to comment.