[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Luasocket socket.select timeout bugs?
- From: Marius Kjeldahl <marius@...>
- Date: Wed, 22 Sep 2004 09:22:47 +0200
On Wednesday 22 September 2004 00:25, Diego Nehab wrote:
> > My usage will be listening for sockets, but I do not want that busy loop
> > eating all my CPU cycles.
> I don't think it will. But you should run some tests. Worst case, you
> can run select with a timeout different from 0...
I'm not sure if I am expressing myself poorly, but this is exactly what I did
in the first place. I noticed the timeout was disregarded when listening for
sockets, so for simplicity I attempted a standard "select (nil, nil,
timeoutvalue)" and when that did not work either, I posted about it here.
>From the conversations, I believed you confirmed that disregarding the timeout
value was a bug. Assuming it will be fixed (either by yourself, or somebody
else, even me), there will no longer be a busy loop, as I can tell the select
call to wait a little while before timing out.
Are you saying waiting with a timeout will not make my server process less
busy? I can't imagine why not, but that might just be me.
Thanks for the help anyway,