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 ]
Rusty Shackleford
Ranch Hand
Joined: Jan 03, 2006
Posts: 490
posted
0
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.
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Karup Mew
Ranch Hand
Joined: Aug 11, 2007
Posts: 40
posted
0
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
robin singal
Ranch Hand
Joined: Jul 18, 2007
Posts: 102
posted
0
Just add a few microseconds sleep to the thread which is in while loop. You will see the difference.