Lines Matching defs:threads
41 private static Thread[] threads = new Thread[NUM_THREADS];
102 // start threads, wait for them to block
104 threads[i] = new MyThread("MyThread-" + i);
105 threads[i].start();
108 // threads block after doing some allocation
112 sizes[i] = mbean.getThreadAllocatedBytes(threads[i].getId());
115 // let threads go and do some more allocation
121 // wait for threads to get going again. we don't care if we
127 long newSize = mbean.getThreadAllocatedBytes(threads[i].getId());
130 threads[i].getName() +
134 System.out.println(threads[i].getName() +
139 // let threads exit
147 threads[i].join();
179 ThreadInfo info = mbean.getThreadInfo(threads[i].getId());