Perl: Threading with shared multi-dimensional hash
问题 I am trying to share a multi-dimensional hash over multiple threads. This hash holds 2 connected key-pairs, I need to know if they are already connected, if they are not, I need to connect them, if not, there is no need to go to the database. use threads; use threads::shared; my %FLUobject2param : shared = (); #Start a new thread for every available processor for (my $i=0;$i<$PROCESSORS;$i++) { threads->new(\&handlethread); } #Catch if these threads end foreach my $onthr (threads->list()) {