Skip to content

Status of proposed Boost.AFIO

Niall Douglas edited this page Jun 16, 2013 · 5 revisions

There has been some interest in starting to use proposed GSoC Boost.AFIO (a batch, chainable asynchronous closure execution and asynchronous file i/o library extending Boost.ASIO) immediately before Boost GSoC 2013 is completed in September. Here are some quick notes on the library's present status:

  • The pre_boost_import branch is considered stable, feature complete and ready for use using the POSIX compat backend only. To use it right now as if the Boost.AFIO master branch were ready, simply use a namespace alias to map the async_io namespace as boost::afio:

namespace boost { namespace afio = triplegit::async_io; }

Very little in terms of anything which would break source code compatibility is expected to change during the port of the existing code to Boost layout and naming. Right now that branch's current build and unit tests status on Travis CI is and its unit test code coverage is: Coverage Status. Click on either of the badges for details.

  • The above branch requires, as an absolute minimum, variadic templates support in your compiler which means a certain minimum of C++11 support. GCC 4.6 or clang 3.x with libstdc++ 4.6 or better is absolutely plenty. For VS2012, you'll need the variadic template supporting experimental MSVC compiler or forthcoming VS2013.

What is known to NOT work is libstdc++ 4.2 which is the standard C++ library supplied on FreeBSD. libcxx, its forthcoming replacement in FreeBSD 10, is as yet untested.

  • Supported platforms are a subset of those for Boost.ASIO, so I duplicate here from http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/using.html the expected platforms:

  • Win32 and Win64 using Visual C++ 2013 (or VS2012 with Nov 2012 CTP).

  • Win32 using MinGW.

  • Win32 using Cygwin.

  • Linux (2.4 or 2.6 kernels) using g++ 4.6 or later (or clang++ 3.x).

  • Solaris using g++ 4.6 or later (or clang++ 3.x). Currently untested.

  • Mac OS X 10.4 using g++ 4.6 or later (or clang++ 3.x). Currently untested.

The POSIX compat backend is straight POSIX: If your platform supports preadv() and pwritev() you're covered. If you can get a new enough compiler, I would expect that the other Boost.ASIO platforms AIX, HP-UX and Tru64 should all work. BlackBerry 10 (QNX) is intentionally unsupported due to the wording of the excluded development legal agreement applied to one of the library's authors by his employer.

Right now the Windows IOCP backend corrupts data due to https://svn.boost.org/trac/boost/ticket/8669. You can force usage of the POSIX compat backend on Windows by defining USE_POSIX_ON_WIN32.

Clone this wiki locally