zollen
asked on
Question about socket/Thread programming...
Hi Guys,
If a thread calls a blocking socket.read(...), is it possible for another thread to wake up the blocking thread, so socket.read(...) return immediately
(2nd question: Is there any non-blocking socket.read(...)?)
stephen
If a thread calls a blocking socket.read(...), is it possible for another thread to wake up the blocking thread, so socket.read(...) return immediately
(2nd question: Is there any non-blocking socket.read(...)?)
stephen
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
As an alternative to a non-blocking read, you can call "available()" to see if any data is there, before you commit to calling read().