chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] [RESUBMISSION] Get rid of all select() cal


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] [RESUBMISSION] Get rid of all select() calls in favor of poll() where available
Date: Wed, 8 May 2013 11:58:25 +0200
User-agent: Mutt/1.4.2.3i

On Wed, May 08, 2013 at 11:52:20AM +0200, Felix wrote:
> > I've also decided to reimplement file-select in terms of poll(), since
> > it's defined in posixunix.scm and all our supported UNIX variants have
> > defined HAVE_POSIX_POLL anyway.  There are still some issues with
> > file-select, but none of them are new:
> > 
> > - It blocks the entire process
> > - It doesn't handle waiting for read/write on the same FD  (it will return
> >    all in the second list, but that's AFAIK undefined - it may just return
> >    all in the first or in both lists, depending on kernel & libc in use)
> > - It's a pretty huge and ugly procedure
> 
> I will push patches #2 and #3 shortly, but am unsure about the first
> patch.  Specifically, the timeout calculation in tcp: you compute
> "(current-milliseconds)" before entering the loops that might
> yield. Doesn't have the time to be recomputed to be updated after the
> yield returns?

IIUC that's a bug in the current system: recalculating causes the timer
to be reset, possibly never timing out if it keeps looping for some
reason like EAGAIN.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]