Hola a todos. Tengo nuevamente problema de threads.
Primero les dejo una prueba de concepto para tratar de entender mejor.
#!/usr/bin/perl
use threads;
system'clear';
my@SALIDA : shared=(12,12,12,12,12,12,12,12,12,12,15);
$THREAD_NUM_COLUMN = 5;
for(0 .. $THREAD_NUM_COLUMN-1) {
push @threads, threads->create(\&CHECKING);
}
sleep(1);
foreach $THREAD_FOR (@threads){
#print"finalizado ".$THREAD_FOR->tid() , "\n"; ##DEBUG
$OUT_NUMBER= $THREAD_FOR->join();
}
print"RETORNADO: $OUT_NUMBER\n";
sub CHECKING{
my@NUMBER_ARRAY : shared=(0..100);
$TID_COLUMN = threads->tid();
$I = $TID_COLUMN - 1;
while ( $I < @NUMBER_ARRAY ) {
$INT_COLMN = ...