httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <>
Subject Re: Fibers and thread local storage
Date Fri, 15 Jan 1999 12:28:40 GMT
Dean Gaudet <> wrote:
>i/o for userland threads is abstracted -- you open all
>sockets/pipes/etc. in non-blocking mode even if the caller wanted a
>blocking socket/etc. Then when the caller does a read/write you give
>it a try, if you get EWOULDBLOCK, then you put the caller to sleep,
>and put the fd into an fd_set to pass to select() later during your
>idle loop.

It needs a little more kernel support than that -- there's a whole
pile of IO calls that block regardless: things like open, close, stat,
unlink, etc. and also Unix treats disk file fds as never blocking.


View raw message