noslenj123 has asked for the wisdom of the Perl Monks concerning the following question:
I tried creating arrays of IO::Select objects which seemed to fall down just over 100 sockets. I tried using threads with a thread per socket which fell down around 110 sockets.
Recently I read something here that suggested that IO::Select can handle 64 sockets and that you can only have one IO::Select object per thread.
So I am trying to accept new sockets and push them onto a shared array or hash so that pre-started worker threads can lock that hash and suck the sockets out and handle them in it's own IO::Select. I have run into the dreaded "Invalid value for shared scalar" thingy. I also tried using Thread::Queue with no luck.
Does anyone have any wisdom on how to handle a large number of sockets (100-512) simultanieously? I am using ActivePerl 5.8.0 build 806 (I'll look at a newer version) but I can also run under Linux if that's preferred.
my $nuts = 'in pain';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to pass sockets to different threads?
by pg (Canon) on Dec 30, 2003 at 23:16 UTC | |
|
Re: How to pass sockets to different threads?
by bl0rf (Pilgrim) on Dec 31, 2003 at 00:46 UTC | |
|
Re: How to pass sockets to different threads?
by Mr_Person (Hermit) on Dec 31, 2003 at 15:45 UTC | |
|
Re: How to pass sockets to different threads?
by LunaticLeo (Scribe) on Dec 31, 2003 at 17:19 UTC | |
by noslenj123 (Scribe) on Jan 03, 2004 at 05:57 UTC | |
by rcaputo (Chaplain) on Jan 09, 2004 at 09:01 UTC |