Ich habe das folgende Muster von Code in Perl auf einem Unix-System verwendet, aber es stürzt unter Windows ab. Wie kann ich dasselbe erreichen, indem ich mit Windows Perl oder Fork unter Windows verwende?Parallele Programmierung in Perl unter Windows?
use Parallel::ForkManager;
my $pm = Parallel::ForkManager->new($MAX_PROCESSES);
DATA_LOOP:
foreach my $data (@all_data) {
# Forks and returns the pid for the child:
my $pid = $pm->start and next DATA_LOOP;
# ... do some work with $data in the child process ...
$pm->finish; # Terminates the child process
}
[Thema :: Queue] (http://p3rl.org/Thread::Queue) – choroba
Was entspricht dem obigen Code würde mit 'Thread :: Warteschlange '? – CJ7
@choroba Es hat auch nicht funktioniert. Stürzt auch ab. – CJ7