Skip to content

Commit b608ca3

Browse files
committed
Use Thread.start() consistently (vs. Thread.run())
Most examples use Thread.start(), but the early description uses Thread.run(). These should be consistent; since the method on a thread object is $thread.start(), it seems one less thing to remember to call the class method .start() as well.
1 parent 7b0188b commit b608ca3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

S17-concurrency-jnthn.pod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ C<Promise> is kept, it has a C<True> result.
295295
my $timecalc = Promise.anyof($calc, $timeout);
296296

297297
There is also an C<allof> combinator, which creates a C<Promise> that will be
298-
kept well all of the specified C<Promise>s are kept, or broken if any of them
298+
kept when all of the specified C<Promise>s are kept, or broken if any of them
299299
are broken.
300300

301301
The C<then> method on a C<Promise> is used to request that a certain piece of
@@ -603,10 +603,10 @@ work with C<Thread>s directly. However, those building their own schedulers
603603
may well need to do so, and there may be other exceptional circumstances that
604604
demand such low-level control.
605605

606-
The easiest way to start a thread is with the C<run> method, which takes a
606+
The easiest way to start a thread is with the C<start> method, which takes a
607607
C<Callable> and runs it on a new thread:
608608

609-
my $thread = Thread.run({
609+
my $thread = Thread.start({
610610
say "Gosh, I'm in a thread!";
611611
});
612612

0 commit comments

Comments
 (0)