You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and BOOST_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 (without BOOST_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?
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
), the2nd 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?
The text was updated successfully, but these errors were encountered: