InSocket: Use epoll instead of select

chmike christophe_no_spam at meessen.net
Thu Jan 11 05:07:01 PST 2007


Hello,

I am considering using D for an ORB like application and I am confused about
Socket class providing select. select is known for years to be inefficient.
Various solutions have been proposed to solve this and the later one (epoll)
is the most efficient one.

D should really consider moving to epoll API. I am using epoll for my server
applications.  To keep my code portable on windows I wrote the three epoll API
calls wrapping use of select inside.

select requires to poll sockets for event, where epoll returns a list of
socket that had an event. The effort with select is proportional to the number
of sockets regardless of their activity. With epoll it is proportional to the
effective activity. idle connections don't waste CPU. epoll scales very well.




More information about the Digitalmars-d mailing list