[fpc-devel] Linux Signals
andrew.t.brunner at gmail.com
Sun Jan 2 15:55:01 CET 2011
On Sun, Jan 2, 2011 at 4:43 AM, Michael Van Canneyt
<michael at freepascal.org> wrote:
> Do note that you're back to polling, which I understood you wanted to avoid
> in the first place ?
Sigh - yes, your right. I haven't given up on kernel level signals
(SIGIO/SIGPOLL) and random posts on various *nix forums talk about
people doing things as I suspect. So I realize that socket signaling
is possible. There are only two io events I need. I am willing to
use epoll_* to run some tests. If the kernel is efficient at circling
the array - I may not notice the difference. People have mentioned
that epoll is scalable within reasonable expectations of using my
engine. 3,000 sockets per thread shouldn't be too much to handle.
SIGIO was giving me notice on socket closings and on datagrams ending
in CRLF. I'm thinking there has to be a way to tell the kernel that
this fd is a socket - and when that happens the kernel might send more
signals eg.) like after a few ns after data stops streaming in or
when MSG_MORE* isn't attached to the actual TCP/IP frame. But as an
application we can't count on MSG_MORE being attached to each
unfinished datagram (as in NetCat and Telnet).
More information about the fpc-devel