Skip to content

Commit 1c9eace

Browse files
committed
Document X::Proc::Async::AlreadyStarted
1 parent 1517511 commit 1c9eace

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

lib/Type/Proc/Async.pod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ Initiates spawning of the external program. Returns a promise that will be
8787
kept with a L<Proc::Status|/type/Proc::Status> object once the external
8888
program exits, and that will be broken if the program cannot be started.
8989
90+
If C<start> is called on a Proc::Async object on which it has already been
91+
called before, an exception of L<type
92+
X::Proc::Async::AlreadyStarted|/type/X::Proc::Async::AlreadyStarted> is
93+
thrown.
94+
9095
=head2 method path
9196
9297
method path(Proc::Async:D:)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
=begin pod
2+
3+
=TITLE class X::Proc::Async::AlreadyStarted
4+
5+
=SUBTITLE Exception for when you call C<start> on an already started Proc::Async object
6+
7+
class X::Proc::Async::AlreadyStarted is Exception { ... }
8+
9+
When you call C<start> twice on the same L<Proc::Async|/type/Proc::Async>
10+
object, the second invocation will die with an
11+
C<X::Proc::Async::AlreadyStarted> exception.
12+
13+
my $proc = Proc::Async.new("echo");
14+
$proc.start;
15+
$proc.start; # Process has already been started
16+
17+
=end pod

0 commit comments

Comments
 (0)