Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
document Channel.Supply, Promise.Supply
Also add link to concurrency doc

Closes #366
  • Loading branch information
jonathanstowe committed Jan 26, 2016
1 parent d78c5ef commit f52538b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/Type/Channel.pod
Expand Up @@ -20,6 +20,8 @@ one or more producers to one or more consumers.
$c.close;
say $c.list;
Further examples can be found in the L<concurrency page|/language/concurrency#Channels>
=head1 Methods
=head2 method send
Expand Down Expand Up @@ -129,6 +131,20 @@ Closes the channel (that is, makes subsequent C<send> calls die), and enqueues
the error as the final element in the channel. Method C<receive> will throw
the error as an exception.
=head2 method Supply
Defined as:
method Supply(Channel:D:)
Usage:
CHANNEL.Supply
This returns an C<on-demand> L<Supply|Supply> that emits a value for every value
received on the Channel. C<done> will be called on the C<Supply> when the L<Channel>
is closed.
=head2 sub await
Defined as:
Expand Down
10 changes: 10 additions & 0 deletions doc/Type/Promise.pod
Expand Up @@ -46,6 +46,8 @@ the C<vow> method to get a unique handle, and call C<keep> or C<break> on it:
}
=end code
Further examples can be found in the L<concurrency page|/language/concurrency#Promises>.
=head1 Methods
=head2 method start
Expand Down Expand Up @@ -232,6 +234,14 @@ exception of type C<X::Promise::Vowed>.
$vow.keep;
say $p.status; # Kept
=head2 method Supply
method Supply(Promise:D:)
Returns a L<Supply> that will emit the C<result> of the L<Promise> being Kept
or C<quit> with the C<cause> if the L<Promise> is Broken.
=head2 sub await
multi sub await(Promise:D)
Expand Down
2 changes: 2 additions & 0 deletions doc/Type/Supply.pod
Expand Up @@ -41,6 +41,8 @@ The L<live method|#method live> returns C<True> on live supplies. Factory
methods such as L<interval|#method interval>, L<from-list|#method from-list>
will return I<on demand> supplies.
Further examples can be found in the L<concurrency page|/language/concurrency#Supplies>.
=head1 Methods that return Taps
=head2 method tap
Expand Down

0 comments on commit f52538b

Please sign in to comment.