Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

CPU usage goes to 100%  RSS feed

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Karup Mew
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just add a few microseconds sleep to the thread which is in while loop. You will see the difference.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!