9 This test tests the interaction of C<async {}> and
10 C<run>. Ideally, while a C<run> call is in progress,
11 C<async> blocks are still being executed.
16 diag "Running under $*OS";
21 sub spawn_counter () {
23 my $count = $event_count;
27 sleep 1; # five seconds are enough for everybody
34 ok(0, "async+run known to be erratic _everywhere_, disable for now", :todo<bug>);
37 if $?OS eq any <MSWin32 mingw msys cygwin> {
38 skip 1, "async known to be problematic on Win32";
42 diag "Spawning counter";
44 run( qq!$*EXECUTABLE_NAME -e "sleep(5)"!);
46 if (!ok(@events == $event_count, "Our async counter finished while we were running a subprocess")) {
47 diag "Got " ~ +@events ~ " element(s).";
48 diag "Expected $event_count elements."