Skip to content

Commit 293c2ba

Browse files
committed
Concurrency: use present tense
1 parent 8c07f04 commit 293c2ba

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

lib/Language/concurrency.pod

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@ consumed by one or more consumers simultaneously in a manner similar to
188188
"events" in other programming languages and can be seem as enabling
189189
"Event Driven" or reactive designs.
190190
191-
L<Supply> is a role that can be composed into your own types, but will
191+
L<Supply> is a role that can be composed into your own types, but will
192192
frequently be used as a "type punned" class to create standalone objects.
193193
194194
At its simplest a L<Supply> is a message stream that can have multiple
195195
subscribers created with the method C<tap> on to which data items can be
196-
placed with C<emit> :
196+
placed with C<emit>:
197197
198198
my $supply = Supply.new();
199199
@@ -214,25 +214,25 @@ interested in the events:
214214
$supply.emit("Won't trigger the tap");
215215
216216
Calling C<close> on the L<Tap> object (or calling C<close> on the supply
217-
object with the tap object as an argument,) will trigger the callback
217+
object with the tap object as an argument,) triggers the callback
218218
specified by C<closing> if present and stop further events being sent to
219219
the tap callback but otherwise leave the supply intact to receive further
220-
events. Calling C<done> on the supply object will similarly call the
221-
C<done> callback that may be specified for any taps but will not prevent any
220+
events. Calling C<done> on the supply object similarly calls the
221+
C<done> callback that may be specified for any taps, but does not prevent any
222222
further events being emitted to the stream, or taps receiving them.
223223
224-
The method C<interval> will return a new supply which will automatically
225-
emit a new event at the specified interval, the data that is emitted will
226-
be an integer starting at 0 that will be incremented for each event. The
227-
following code will output 0 .. 5 :
224+
The method C<interval> returns a new supply which peridically
225+
emits a new event at the specified interval. The data that is emitted
226+
is an integer starting at 0 that is incremented for each event. The
227+
following code outputs 0 .. 5 :
228228
229229
my $supply = Supply.interval(2);
230230
$supply.tap(-> $v { say $v });
231231
sleep 10;
232232
233-
A second argument can be supplied which will specify a delay in seconds
233+
A second argument can be supplied which specifies a delay in seconds
234234
before the first event is fired. Each tap of a supply created by
235-
C<interval> will have its own sequence starting from 0, as illustrated
235+
C<interval> has its own sequence starting from 0, as illustrated
236236
by the following:
237237
238238
my $supply = Supply.interval(2);
@@ -244,8 +244,8 @@ by the following:
244244
An existing supply object can be filtered or transformed, using the methods
245245
C<grep> and C<map> respectively, to create a new supply in a manner like
246246
the similarly named list methods: C<grep> returns a supply such that only
247-
those events emitted on the source stream for which the expression provided
248-
to the C<grep> will be enitted:
247+
those events emitted on the source stream for which the C<grep> condition
248+
is true is emitted on the second supply:
249249
250250
my $supply = Supply.new;
251251
$supply.tap(-> $v { say "Original : $v" });
@@ -257,9 +257,9 @@ to the C<grep> will be enitted:
257257
$supply.emit($_);
258258
}
259259
260-
C<map> will return a new supply such that for each item emitted to the
260+
C<map> returns a new supply such that for each item emitted to the
261261
original supply a new item which is the result of the expression passed
262-
to the C<map> will be emitted:
262+
to the C<map> is emitted:
263263
264264
my $supply = Supply.new;
265265
$supply.tap(-> $v { say "Original : $v" });

0 commit comments

Comments
 (0)