|
Threads and Timeout in Socket Networking
Question:
does creating a timeout in a thread that loops infinitely would help in reducing the lag or CPU usage?
The Implementation is this:
we have a method thread that loops infinitely waiting for a connection. but it costs a lot of CPU usage. is there any way to decrease it's CPU usage? possibly by creating timeouts of the thread? or is there in any way to efficiency of the code?
|