Lightknight has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a module, Parallel::Loops, that now uses IO::Select on a pipe's handles. However select only works on windows for sockets.
And perlport says that:
select Only implemented on sockets. (Win32, VMS) Only reliable on sockets. (RISC OS)I guess I could test for Win32 || VMS || RISC_OS somehow (by finding what $^O is on all those platforms?). But that is brittle. Is there "a better way" to judge whether select works without having to fork and without it costing (too much) runtime? ($Config{d_select} eq 'define') seems to be true for both linux and Windows, unhelpfully.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to test for reliable select()?
by BrowserUk (Patriarch) on Mar 22, 2011 at 10:08 UTC | |
Re: How to test for reliable select()?
by ambrus (Abbot) on Mar 22, 2011 at 11:22 UTC | |
Re: How to test for reliable select()?
by ikegami (Patriarch) on Mar 22, 2011 at 17:20 UTC |
Back to
Seekers of Perl Wisdom