Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some spelling fixes and clearer wording
Small changes to make the meaning of certain sentences clearer.
  • Loading branch information
sylvarant committed Dec 13, 2015
1 parent 621eb8a commit 917addb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions doc/Language/concurrency.pod
Expand Up @@ -7,7 +7,7 @@
In common with most modern programming languages, Perl 6 is designed to
L<support concurrency|http://en.wikipedia.org/wiki/Concurrent_computing>
(allowing more than one thing to happen at the same time) and
asynchronous programming (sometime called event driven or reactive
asynchronous programming (sometimes called event driven or reactive
programming - that is an event or change in some part of a program
may lead to an event or change in some other part of the program
asynchronously to the program flow).
Expand Down Expand Up @@ -63,14 +63,14 @@ chaining:
$promise1.keep("First Result");
say $promise2.result; # First Result \n Second Result
Here the L<then|/type/Promise#method_then> schedules code to be
Here the L<then|/type/Promise#method_then> method schedules code to be
executed when the first L<Promise> is kept or broken, itself returning
a new L<Promise> which will be kept with the result of the code when
it is executed (or broken if the code fails.) C<keep> changes the
status of the promise to C<Kept> setting the result to the positional
argument. C<result> blocks the current thread of execution until the
promise is kept or broken, if it was kept then it will return the
result (that is the value passed to C<keep>, ) or it will throw an
result (that is the value passed to C<keep>, ) otherwise it will throw an
exception based on the value passed to C<break>. The latter behaviour
is illustrated with:
Expand Down Expand Up @@ -177,14 +177,14 @@ original promises is kept or broken when any of them is broken:
Unlike C<await> however the results of the original kept promises are not
available without referring to the original, so these are more useful
when the completion or otherwise of the tasks is more important to the
consumer than the actual results, or the results have been collected by
other means.
consumer than the actual results, or when the results have been collected
by other means.
If you are creating a promise that you intend to keep or break yourself
then you probably don't want any code that might receive the promise to
inadvertently (or otherwise,) keep or break the promise before you do.
For this purpose there is the L<method vow|/type/Promise#method_vow>, which
returns a L<Vow> object which becomes the only mechanism by the promise
returns a L<Vow> object which becomes the only mechanism by which the promise
can be kept or broken. If an attempt to keep or break the Promise is made
directly then the exception L<X::Promise::Vowed> will be thrown, as long
as the vow object is kept private, the status of the promise is safe:
Expand Down Expand Up @@ -292,8 +292,8 @@ This could also be written using the C<react> keyword:
}
}
Here the C<whenever> creates a tap on the L<Supply> from the provided block,
the C<react> being exited when C<done()> is called in one of the taps.
Here the C<whenever> keyword creates a tap on the L<Supply> from the provided
block. The C<react> block is exited when C<done()> is called in one of the taps.
A second argument can be supplied to C<interval> which specifies a delay
in seconds before the first event is fired. Each tap of a supply created
Expand Down Expand Up @@ -492,8 +492,8 @@ an external program asynchronously:
# Output: foo bar
# Done.
The path to the command and any arguments are supplied to
the constructor but the program will not be started until
The path to the command as well as any arguments to the command are
supplied to the constructor. The command will not be executed until
L<start|/type/Proc::Async#method_start> is called, which will return
a L<Promise> that will be kept when the program exits. The standard
output and standard error of the program are available as L<Supply>
Expand Down Expand Up @@ -566,8 +566,8 @@ to be useful directly in user code.
=head2 Schedulers
The next level of the concurrency API is that supplied by classes that
provide the interface defined by the role L<Scheduler>. The intent
The next level of the concurrency API is supplied by classes that
implement the interface defined by the role L<Scheduler>. The intent
of the scheduler interface is to provide a mechanism to determine which
resources to use to run a particular task and when to run it. The majority
of the higher level concurrency APIs are built upon a scheduler and it
Expand Down

0 comments on commit 917addb

Please sign in to comment.