.receive() polls for new input internally. A .try_receive() method would allow the OS to handle the polling itself and do other useful work between two polls rather than hang until the next input byte or (if supported by the OS) the current kernel thread gets preempted.
.receive()
polls for new input internally. A.try_receive()
method would allow the OS to handle the polling itself and do other useful work between two polls rather than hang until the next input byte or (if supported by the OS) the current kernel thread gets preempted.