Identify high CPU consumed thread for Java app
- by Vincent Ma
Following java code to emulate busy and Idle thread and start it.
import java.util.concurrent.*;import java.lang.*;
public class ThreadTest { public static void main(String[] args) { new Thread(new Idle(), "Idle").start(); new Thread(new…