What are the differences between librt and libeio for asynchronous I/O, and why would I choose one over the other?
I really want to put more in the body to explain the question… but the title really covers it all. As far as I can suss, librt
is more “official” (it’s a standard part of libc
?), but I also remember seeing that Node.js uses libeio
. Which should I spend more time looking int开发者_运维问答o? What about portability? How different are their APIs?
(I’d appreciate it if somebody with ≥1,500 rep could add the tags “libeio” and “librt” to this question, as I cannot.)
libeio wraps standard calls in threads, and handles a large swath of the common system calls.
librt only has a few calls -- read and write, but not, for example, stat.
精彩评论