I'm using boost::asio::serial_port to read and write to a serial port device. I do the reading inside a boost::thread to take advantage of RS-232 being full-duplex. My read calls are like this one:
BYTE b;
read( m_SerialPort, boost::asio::buffer(&b,1) );
Everything works OK except for shutdown. When I want to end the thread, it's almost always blocked in a read call. How do I unblock it? I tried:
Darío Eduardo Ramos
Meditech S.A. www.meditech.com.ar
(+54) 01147603300, Interno 31
Av. Julio A. Roca 3456
Florida Oeste, Bs.As. Argentina