Java threads problems encountered and solutions JNI call

  Debugging the problem can be thread through optimizeit software to monitor its performance 

  1, Thread processThread = new Thread ( 
  New ICMPPongRunnable (pingHandle)); 
  ProcessThread.start (); 

  This thread will cause the use of threads unable to release resources, allowing the system to increase the number of threads, the solution is not to define the use of anonymous type threads. 

  2, the problem can not stop threads 

  PingThread.interrupt is called () and then to capture this thread interrupted abnormal withdraw from the 

  3, as far as possible the use of threads called JNI function 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • DotNetKicks
  • DZone
  • Netvouz
  • Propeller

Tags:

Releated Java Articles

Comments

Leave a Reply