Hello Brian, Thanks for your reply
In fact, I wanna create a pool of connections in order
to read articles from one of these, like this :
sub create_connections {
for (my $i = 1 ; $i <= $max_connections ; $i++) {
$all_connections[$i] =
News::NNTPClient->new($best_ip, $port, $debug);
if
a b wrote:
> It's working with scalars variables but I want to improve
> this by using an array (I wanna store 1..n
> connections)
>
> So I wanna found a tip to do it with Threads::shared module
> or another one,
>From 'perldoc perlthrtut' (Shared And Unshared Data):
"In the case of a shared arr
It's working with scalars variables but I want to
improve this by using an array (I wanna store 1..n
connections)
So I wanna found a tip to do it with Threads::shared
module or another one,
Thank you very much
--- $Bill Luebkert <[EMAIL PROTECTED]> a écrit :
> a b wrote:
>
> > Hello,
> >
> >
a b wrote:
> Hello,
>
> I'm a beginner and try to store some connections into
> an array shared between threads, code is here :
>
>
> use 5.008;
> use strict;
> use News::NNTPClient;
> use threads;
> use threads::shared;
>
> my @all_connections : shared;
Hello,
I'm a beginner and try to store some connections into
an array shared between threads, code is here :
use 5.008;
use strict;
use News::NNTPClient;
use threads;
use threads::shared;
my @all_connections : shared;
my $i;
my $c;
for ($i = 1 ; $i < 4 ;