Thanks. Your advice with Data::Dumper helped me a lot. Your code version was not the final solution because the thread was still slow. But it helped me to find the solution. Now the thread is running fast.
Here the code of the main task:
$Data::Dumper::Varname = "gen_data_str"; $gen_data_str1 = Dumper($ref_gen_data); $q->enqueue( $gen_data_str1 ); $q->enqueue( undef );
Here the code within the worker thread:
my %gen_data; while( my $gen_data_str1 = $q->dequeue ) { %gen_data = %{ eval $gen_data_str1 }; };
In reply to Re^2: Thread very slow
by Dirk80
in thread Thread very slow
by Dirk80
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |