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

If the stdout or stderr methods of Proc::Async are called after the program has been started, an exception of type X::Proc::Async::TapBeforeSpawn is thrown.

my $proc ="echo""foo");
CATCH { default { put .^name''.Str } };
# OUTPUT: «X::Proc::Async::TapBeforeSpawn: To avoid data races, you must tap stdout before running the process␤»

The right way is the reverse order

my $proc ="echo""foo");
await $proc.start;


method handle§

method handle(X::Proc::Async::TapBeforeSpawn:D: --> Str:D)

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


Type relations for X::Proc::Async::TapBeforeSpawn
raku-type-graph X::Proc::Async::TapBeforeSpawn X::Proc::Async::TapBeforeSpawn Exception Exception X::Proc::Async::TapBeforeSpawn->Exception X::Proc::Async X::Proc::Async X::Proc::Async::TapBeforeSpawn->X::Proc::Async Mu Mu Any Any Any->Mu Exception->Any X::Proc::Async->Exception

Expand chart above