RE: Threads:shared and arrays issues

2005-07-27 Thread a b
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

RE: Threads:shared and arrays issues

2005-07-11 Thread Brian Raven
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

Re: Threads:shared and arrays issues

2005-07-09 Thread a b
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, > > > >

Re: Threads:shared and arrays issues

2005-07-09 Thread $Bill Luebkert
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;

Threads:shared and arrays issues

2005-07-09 Thread a b
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 ;