[medusa] Re: Hideously long selects?
Bill Tutt
billtut@m...
Tue, 31 Aug 1999 15:38:57 -0700
> From: Skip Montanaro [mailto:skip@m...]
>
>
> I'm not much of a select expert, but it seems to me that this
> is what's
> causing my problem. Let's assume all those file descriptors
> are wacko web
> browsers (not a big stretch), so they aren't going to send
> input any time
> soon, so it will be a *long* time before Medusa falls out of
> the select call
> and gets around to thinking about new connections, right?
No, the listen() socket should be in the file descriptor list passed into
select(). select() should return when a new connection attempt is made, then
handle_accept() usually gets called. (per handle_read_event() in
asyncore.py)
> Shouldn't the
> timeout be substantially shorter, 0.5-2.0 seconds perhaps?
>
Not particularlily you don't really want to be eating up useless CPU if you
don't have to.
Bill