Re:Using select(2) the right way
by linkregister on Monday June 05, 2017 @01:48AM
(#14485480)
You're right with this comment. There have been times when I would have benefitted by looking at a library's code even when it didn't fit what I was trying to do.
What libraries do you recommend to replace async io system calls in C?
The libevent family of libraries -- libevent, libev, libuv.
check out libev: http://software.schmorp.de/pkg/libev.html
scales well, has a decent API.
The only time you shouldn't use a library, then, is when it literally doesn't work for you. In that case you should modify the library to add support for what you need, get it upstream, and use the library. Even if you decide using a library isn't right for you, you should at least read the source code of a library to see how they would have done it.