I have threads that execute a sub which return an integer.
sub process_tasks {
...
return($nb_item_processed);
}
Here is how I launch the threads
map { threads->new(\&process_tasks, $_) } 1 .. $nb_threads;
How can I compute the sum of all value returned ?