On program termination I call io_context::stop() to drain the event loop, and it works as expected for network stuff, but not for serial_port.
The callback with "asio::async_read(m_serial_port, asio::buffer(...), asio::transfer_at_least(0), ..." never returns.
More interestingly, as probably related, ::close or the destructor for the serial_port will block, but will unblock if a second call to io_context::stop() is made.
When using instead IO_URING backend, the callback issue persists, but the ::close issue does not happen.
Tested with master on Linux.
On program termination I call io_context::stop() to drain the event loop, and it works as expected for network stuff, but not for serial_port.
The callback with "asio::async_read(m_serial_port, asio::buffer(...), asio::transfer_at_least(0), ..." never returns.
More interestingly, as probably related, ::close or the destructor for the serial_port will block, but will unblock if a second call to io_context::stop() is made.
When using instead IO_URING backend, the callback issue persists, but the ::close issue does not happen.