in reply to Sharing large data structures between threads
# data manager (short separate program) while( <> ) { chomp; my ( $command, $value, $address ) = split /\t/; if ( $command eq 'insert' or $command eq 'update' ) { eval( "$address = $value;" ); } elsif( $command eq 'delete' ) { delete $$address; } else{ eval "print \$address;" } } # and the main program: use IPC::Open2; my $pid = open2 my $wh, my $rh, 'DataManager.pl'; ... print $wh "insert\t\"fred\"\t" . '$deepthing01{ fred }{ bert }{ pete } +[99]'; ...
One world, one people
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sharing large data structures between threads
by Anonymous Monk on Mar 07, 2011 at 17:36 UTC | |
by locked_user sundialsvc4 (Abbot) on Mar 09, 2011 at 14:42 UTC | |
by anonymized user 468275 (Curate) on Mar 09, 2011 at 17:32 UTC | |
by BrowserUk (Patriarch) on Mar 09, 2011 at 18:32 UTC | |
by anonymized user 468275 (Curate) on Apr 20, 2011 at 11:47 UTC | |
|