HasPendingData() is specifically meant as a polling mechanism to check whether there is data without blocking. If you want to block, just use Wait() by itself. It is like HasPendingData(), but blocks. Use one or the other, but not both.
HasPendingData() is specifically meant as a polling mechanism to check whether there is data without blocking. If you want to block, just use Wait() by itself. It is like HasPendingData(), but blocks. Use one or the other, but not both.