id summary reporter owner description type status milestone component version severity resolution keywords cc 3627 boost::asio::async_read() cannot be used with null_buffers() Dmitry Goncharov chris_kohlhoff "An attempt to use async_read() with null_buffers() causes the handler to be invoked even when the underlying file descriptor is not yet available for reading. The following test demonstrates the problem void test_async_read() { struct local { static void on_ready(boost::system::error_code const& error, int* invoked) { BOOST_CHECK(!error); *invoked = 1; } }; int p[2]; int const s = pipe(p); BOOST_CHECK(0 == s); boost::asio::io_service ios; boost::asio::posix::stream_descriptor sd(ios, p[0]); ios.reset(); int invoked = 0; boost::asio::async_read(sd, boost::asio::null_buffers(), boost::bind(&local::on_ready, _1, &invoked)); ios.poll_one(); BOOST_CHECK(!invoked); // doesn't pass } This test doesn't pass on linux using either epoll or select multiplexing mechanism. This test also doesn't pass on freebsd using either kqueue or select multiplexing mechanism." Feature Requests new To Be Determined asio Boost 1.40.0 Not Applicable asio async_read null_buffers