socket inputstread read() is blocked due to no data received, but the thread is running, how to understand it?
what’s the block’s meaning and difference with thread block state?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, the thread isn’t running if it’s blocked in read(). Do you mean it is ‘RUNNABLE’? That just means it isn’t blocked in a Java semaphore, and it is runnable as soon as the read() returns. It is waiting for data to arrive from the peer.