It seems that sometimes if there is no data ready, it will also trigger the execution of this function, and blocking the entire main thread. This phenomenon is very similar to a deadlock, so another judgment is added to ptyread to avoid this situation.
related issue: #106
It seems that sometimes if there is no data ready, it will also trigger the execution of this function, and blocking the entire main thread. This phenomenon is very similar to a deadlock, so another judgment is added to ptyread to avoid this situation.