Estimados, tengo el siguiente código:
#!/usr/bin/perl
use strict;
use threads;
use LWP::UserAgent;
use HTTP::Request;
use threads::shared;
#my $compartida :shared = 0;
my @vector : shared;
my ($URL3,$URL2,$URL1,$idvotacion,$opcion,$min,$max);
$idvotacion = "541bac86e4b088456e71d59c";
$URL1 = "http://www.easypolls.net/poll?command=getPoll&pollId=".$idvotacion;
$URL2 = "http://www.eassypolls.net/podll?command=getPoll&pollId=".$idvotacion;
my $y = @vector;
my $r = int(rand($y));
$URL3 = "http://www.easypolls.net/poll?multResp=0&pollId=".$idvotacion."&pollKey=".$vector."&command=saveResponse";
print scalar(localtime),"\n";
my $c = 0;
threads->create('Obtener_PollKey',$URL1,1,10); #Cuenta de 1 al 5 #Se crea el thread pero no se guarda la referencia
#threads->create('Obtener_PollKey',$URL1,1,3); #Cuenta de 1 al 5 ...
Read more : Multihilos |
Vistas : 1530 |
Respuestas : 0 |
Foro : Web