Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I am doing multithreaded programming in perl involving sockets. I am using a IO::Select variable as a shared variable. I am declaring it as.. use threads; use threads::shared; my $write_set : shared; $write_set = new IO::Select(); I will be using this to keep a list of connected client's sockets. I have a thread which will be accepting for client connections. So, in the thread ,when i get a client's request connection, i try to add socket handle to $write_set. $write_set->add($new_sock); The following error is coming. Invalid value for shared scalar at abc.pl line 63. Can any one help me on this regard.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Invalid value for shared scalar error with shared class object
by cdarke (Prior) on Mar 18, 2009 at 13:40 UTC | |
|
Re: Invalid value for shared scalar error with shared class object
by BrowserUk (Patriarch) on Mar 18, 2009 at 13:41 UTC | |
|
Re: Invalid value for shared scalar error with shared class object
by Anonymous Monk on Mar 18, 2009 at 13:36 UTC |