开发者

What are the differences between librt and libeio for asynchronous I/O, and why would I choose one over the other?

开发者 https://www.devze.com 2023-02-15 18:53 出处:网络
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 rememb

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消