in reply to Re: IO::Select woes
in thread IO::Select woes
I can't resist offering this halfway measure (don't take it seriously hehe): use a random timeout (can_read(rand)).
Random (or rather "slightly randomized") timeouts and/or sleeps can be quite useful when you have a lot of cyclic process forked from the same parent process to spread the workload more evenly over time (as long as you remember to call srand after forking).
It's also extremely useful in finding bugs, because it helps simulate the messiness of production environment (compared to the relatively clean one-process-at-a-time developer systems).
|
|---|