=begin pod

=TITLE class X::Proc::Async::TapBeforeSpawn

=SUBTITLE Error due to tapping a Proc::Async stream after spawning its process

    class X::Proc::Async::TapBeforeSpawn is Exception { ... }

If the C<stdout> or C<stderr> methods of L<Proc::Async|/type/Proc::Async> are
called after the program has been C<start>ed, an exception of type
L<X::Proc::Async::TapBeforeSpawn> is thrown.

    my $proc = Proc::Async.new("echo");
    $proc.start;
    $proc.stdout.tap(&print)        # To avoid data races, you must tap stdout before running the process

=head1 Methods

=head2 method handle

    method handle(X::Proc::Async::TapBeforeSpawn:D:) return Str:D

Returns the name of the handle (C<stdout> or C<stderr>) that was accessed after the
program started.

=end pod
