在 C++ 中实现高效的多线程文件 I/O
我目前正在开发一个自定义跨平台文件服务器(C++,boost)。显然,它将执行大量的硬盘读写操作。更复杂的是,它还将是多线程的并使用异步套接字 I/O(使用 asio)。
现在,我想知道是否有我可以使用的众所周知的实践、模式或方法?也许是一些现有的图书馆之类的?当然,我可以尝试从头开始开发它,但这确实感觉就像重新发明一个轮子。任何通用的建议也将不胜感激。
I'm currently developing a custom cross-platform file server (C++, boost). Obviously, it is going to do a lot of reading from and writing to HDD. To further complicate the matters, it is also going to be multithreaded and to use asynchronous socket I/O (with asio).
Now, I wonder, are there any well-known practices, patterns or approaches I can use? Maybe some existing libraries or something? I can try and develop it from scratch, of course, but it does feel like reinventing a wheel. Any generic recommendations will be appreciated as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在快速谷歌搜索中看到的线程很少。请检查这是否有帮助。
Few threads I have seen on quick Googling. Please check if this helps or not.