
27 Aug
2009
27 Aug
'09
8:09 p.m.
On Thu, Aug 27, 2009 at 3:07 PM, Rutger ter Borg
Robert Dailey wrote:
In other words, a call to join() on that thread hangs indefinitely until data is received. My completion callback is not executed at all until data arrives for reading.
How can I force run() to return when I interrupt my thread?
Have you tried to close or cancel the serial port object? It should return your waiting handlers with an "operation interrupted" error code.
Good idea, this would have worked. However, I chose to call io_service::poll() instead to keep my thread from being blocked in the first place.