I call boost::asio::serial_port::async_write_some() and asio::io_service::run() in the other thread. There is a callback given to "async_write_some". Can I safely assume, that this callback will be eventually called (possibly with some error code)? Under what circumstances it's not true?
Can I safely assume, that this callback will be eventually called (possibly with some error code)?
I think no.
Under what circumstances it's not true?
The io_service::stop method is called before data is sent.