my $queue1 = new Thread::Queue; #Thread Timeout Test my $command = 'diskpart'; #my ($thr) = threads->create(sub {return `$command`;}); my ($thr) = async{ my @resp1 :shared = `$command`; $queue1->enqueue(\@resp1, undef); return; }; threads->list(); my $count = 60 * 1; #wait a min (testing) while ($count and !$thr->is_joinable()) { sleep(1); count--; } if (!$thr->is_joinable()) { threads->exit(); } ...