in reply to Re^2: Using simultaneous threads
in thread Using simultaneous threads

Note that calling join on a thread waits for it to complete, so to prevent blocking you'll have to find a way to ensure that your thread terminates. Also, you might have to do some experimentation to determine which thread will get the signal.

I think you are better off using fork in this situation -it's going to be a lot simpler. Just keep track of the pids you create:

our @pids; ... for my $db (keys %{$db_ds}) { ... my $pid = fork(); if ($pid == 0) { exec(...); } else { push(@pids, $pid); } }
and then call kill 9, @pids in your signal handler.

Finally, be sure to read perlthrtut -- it mentions some caveats about using signals and threads.