
27 Aug
2009
27 Aug
'09
8:10 p.m.
Robert Dailey
I'm currently using a serial_port object to call async_read_some(). This results in io_service::run() blocking until at least 1 byte or more can be read from the serial port. If nothing is ever sent, then I can not safely exit the thread in which io_service::run() is executing in.
[...] I haven't used the serial_port object, but for a network socket, you can just close the network socket from another thread, and your completion handler will run with an appropriate error. Hope this helps, -----Scott.