however, consider what would happen if no character arrived or simply arrived after a substantial delay. What is needed is a mechanism to block only those threads which are competing for access to the UART receive hardware. The solution is to use a semphore: