Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Does IO::Select work? Solution (busy loop)

by tye (Sage)
on Oct 25, 2012 at 13:16 UTC ( #1000862=note: print w/replies, xml ) Need Help??


in reply to Re^3: Does IO::Select work? Solution
in thread Does IO::Select work? Anywhere?

Just change the time-out, probably from 0 to "infinity" (which is likely represented by -1).

- tye        

  • Comment on Re^4: Does IO::Select work? Solution (busy loop)

Replies are listed 'Best First'.
Re^5: Does IO::Select work? Solution (busy loop)
by zentara (Archbishop) on Oct 25, 2012 at 15:42 UTC
    Tye, I didn't think you cared about anything I wrote!. :-) I tried -1 for infinity, and still 100% cpu. But I had the audacity to undefine infinity and it does the right thing. CPU usage is minimal.
    #Change: #my ($new_readable) = IO::Select->select($readable_handles, undef, und +ef, 0 ); # to my ($new_readable) = IO::Select->select($readable_handles, undef, unde +f, undef );
    and the server in Re: Does IO::Select work? Solution is the Holy Grail after all. No sysctl.ph needed. :-) Minimum cpu usage.

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000862]
help
Chatterbox?
[robby_dobby]: As in, it's-too-fancy- that-it-will-be- messy-to-handle
[choroba]: bit vectors as keys?
[robby_dobby]: Hmm, I keep falling asleep at my desk, while maintaining an active appearance. Am I getting old?
[robby_dobby]: Every time I fall asleep, there's a small guy in the dreams, shouting "Whoo!" and it jolts me awake. :/
[Lady_Aleena]: robby_dobby, at least you aren't driving. I seem to always be driving somewhere in my dreams and end up at a weird house.
[robby_dobby]: LA: That's there. But this is work and it's the same thing as falling asleep driving :-)
[Lady_Aleena]: I love the dream where I was at a huge house and decided to go swimming in the pool, but then the tour group showed up.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-05-29 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?