Here it seems that it would be better to catch the exceptions more selectively. For example if one is reading in an infinite loop and then the port disappears (USB serial port converter gets disconnected etc) the loop turns into a non-blocking loop consuming all the CPU. In other words there is no way of telling if the B.empty is a timeout, or something more severe.
Here it seems that it would be better to catch the exceptions more selectively. For example if one is reading in an infinite loop and then the port disappears (USB serial port converter gets disconnected etc) the loop turns into a non-blocking loop consuming all the CPU. In other words there is no way of telling if the B.empty is a timeout, or something more severe.