Home | History | Annotate | Download | only in src

Lines Matching defs:thread

25         final Thread[] threads = new Thread[numberOfThreads];
27 threads[t] = new Thread(new Main());
30 for (Thread t : threads) {
39 static Thread getHeapTaskDaemon() throws Exception {
46 Thread[] array = new Thread[activeCount];
48 for (Thread thread : array) {
49 if (thread.getName().equals("HeapTaskDaemon") &&
50 thread.getState() != Thread.State.NEW) {
51 return thread;
55 Thread.sleep(10);
60 Thread heapDaemon = getHeapTaskDaemon();
65 Map<Thread, StackTraceElement[]> map = Thread.getAllStackTraces();
66 for (Map.Entry<Thread, StackTraceElement[]> pair : map.entrySet()) {
67 Thread thread = pair.getKey();
68 // Expect empty stack trace since we do not support suspending the GC thread for
70 if (thread == heapDaemon) {
71 System.out.println(thread.getName() + " depth " + pair.getValue().length);
77 if (Thread.currentThread().getId() <= 0) {
78 System.out.println("current thread's ID is not positive");
81 Map<Thread, StackTraceElement[]> stMap = Thread.getAllStackTraces();
82 for (Thread thread : stMap.keySet()) {
83 if (thread.getId() <= 0) {
84 System.out.println("thread's ID is not positive: " + thread.getName());