Extend asynchronous file io in boost::asio to Mac OS X

ε祈祈猫儿з 提交于 2019-12-21 20:46:42

问题


The boost::asio package contains classes for doing asynchronous file io in Windows using IO completion ports. To my understanding, there is no support for asynchronous file io for other platforms included in the asio package.

I am wondering what would need to be done in order to extend asio with asynchronous file io support for at least Mac OS X, but also to some extent Linux. I am mostly interested in what would need to be done on the asio side of things, but since I am not that experienced with Mac OS X programming I don't mind pointers on where to find more information on how to do asynchronous file io in Mac OS X as well - is PBReadForkAsync what I should be looking at?

Update: I've finally gotten around to attempt to build asynchronous file io (outside boost::asio) on Mac OS X using aio_read/aio_write, however I am unable to get the callback data I need (see How to get user data for aio signal handler in Mac OS X).


回答1:


According to this page, boost::asio works on OS X, with one minor constraint: http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/overview/implementation.html



来源:https://stackoverflow.com/questions/2063209/extend-asynchronous-file-io-in-boostasio-to-mac-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!