Open ceggers-arri opened 2 months ago
I have encountered a similar problem where when I enable BOOST_ASIO_DISABLE_EPOLL and BOOST_ASIO_HAS_IO_URING, the boost::asio::steady_timer callback cycle setting does not take effect and runs every 300 seconds.
OS: linux-6.6.49 Boost: 1.84.0
I have taken an older "blocking read with timeout" example from here: https://lists.boost.org/Archives/boost/2007/04/120339.php
This example (updated source code below) works fine as long as using the epoll reactor (simply try with a non connected UART, the program should finish after two seconds).
But as soon as I switch to the io_uring implementation (by defining
BOOST_ASIO_HAS_IO_URING
andBOOST_ASIO_HAS_IO_URING_AS_DEFAULT
), the 2nd timeout is not reached (program exits after 301 seconds).When I only define
BOOST_ASIO_HAS_IO_URING
(withoutBOOST_ASIO_HAS_IO_URING_AS_DEFAULT
), the program works fine. Additionally I recognized that the behavior depends on the timing. When single stepping in a debugger, also the 2nd timeout works correctly.Q: Is the example program correct? Q: Why does it not work as expected with io_uring?