[Logo]
Forums Register Login
CPU usage goes to 100%
Hi All,

when I try to regeistering the clients through register method of SocketChannel class sometimes its occupy the cpu memory full suddenly sytem hangs. I dont why its happened Kindly sove this problem if anybody knows the solution.
[ December 08, 2008: Message edited by: Karup Mew ]
Does this run in a loop?

With nothing to block, of course it is going to take all your CPU time since it never rests.
 

Originally posted by Rusty Shackleford:
Does this run in a loop?

With nothing to block, of course it is going to take all your CPU time since it never rests.



Yes this is running in a loop
Just add a few microseconds sleep to the thread which is in while loop. You will see the difference.

This thread has been viewed 903 times.

All times above are in ranch (not your local) time.
The current ranch time is
Sep 23, 2018 09:53:16.