[fpc-devel] Linux Signals

Nikolai Zhubr n-a-zhubr at yandex.ru
Sun Jan 2 12:24:09 CET 2011


02.01.2011 13:43, Michael Van Canneyt:
>
> On Sat, 1 Jan 2011, Andrew Brunner wrote:
>
>> Thanks, Nikolai. epoll looks like the silver bullet (for linux) and
>> very promising. I can dump a bunch of sockets into it and get the
>> kernel to let me know which ones get notifications for
>> reset/read/write.
>
> ...Which is what I suggested in the first reply to your original question.
>
> Do note that you're back to polling, which I understood you wanted to
> avoid in the first place ?

Formally yes maybe, but Andrew probably meant just avoiding some 
horrible CPU-burning busy-loop.

Despite of the similar name (epoll), substantial shortcomings of 
classical polling scheme are gone. Say, you need not use a timeout to be 
able to handle any non-socket events like you were forced with select(), 
you can wait on descriptors of different types if you wish to, and you 
don't have to pass huge arrays all the way.


Nikolai

>
> Michael.
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>




More information about the fpc-devel mailing list