Invalid value for shared scalar

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


    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.


The following error is coming.

Invalid value for shared scalar at line 63.

Can any one help me on this regard.

Site Timeline