title: How do I perform a nonblocking read using asio?
body: <p>I am attempting to use boost::asio to read and write from a device on a serial port. Both boost::asio:read() and boost::asio::serial_port::read_some() block when there is nothing to read. Instead I would like to detect this condition and write a command to the port to kick-start the device.</p>
  
  <p>How can I either detect that no data is available?</p>
  
  <p>If necessary I can do everything asynchronously, I would just rather avoid the extra complexity if I can.</p>