Quote Originally Posted by brewbuck View Post
How are you going to use non-blocking IO without polling? So what you're saying is, you want to use the entire resources of a multi-gigahertz computer system, completely maxing it out, in order to process data that is coming in at several thousands bytes per second?
No, I was talking about "blocking I/O" -- that is, NOT setting O_NONBLOCK. I'm not saying it's the best way to do it, I just found that I was getting predictable results reading the serial port this way. Of course, I found NON-BLOCKING I/O without select() or one of the other methods I mentioned a poor way to implement communication with the serial port, as it just looped way too fast to be useful.

I ended up going back to select() as the app grew, since using blocking I/O brings everything to a halt as long as the machine is polling the port.

Couldn't I could use blocking I/O in a thread without select() and still prevent the main thread from stopping dead in its tracks?