/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | OldThreadGroupTest.java | 105 private boolean inListOfThreads(Thread[] threads) { argument 106 for (int i = 0; i < threads.length; i++) { 107 if (Thread.currentThread() == threads[i]) { 121 assertTrue("Current thread must be in enumeration of threads", 133 // start some the threads and see how the count changes 142 Thread.sleep(500); // starting threads isn't instant! 152 // kill the threads and count 'em again 156 Thread.sleep(500); // killing threads isn't instant 337 // Give the threads a chance to die.
|
/libcore/dalvik/src/main/java/dalvik/system/profiler/ |
H A D | SamplingProfiler.java | 89 * The {@code ThreadSet} that identifies which threads to sample. 104 * The threads currently known to the profiler for detecting 110 * Map of currently active threads to their identifiers. When 111 * threads disappear they are removed and only referenced by their 112 * identifiers to prevent retaining garbage threads. 134 * specified depth from the threads specified by the specified 147 * @param threadSet The thread set specifies which threads to 148 * sample. In a general purpose program, all threads typically 177 * A ThreadSet specifies the set of threads to sample. 181 * Returns an array containing the threads t 185 public Thread[] threads(); method in interface:SamplingProfiler.ThreadSet 195 newArrayThreadSet(Thread... threads) argument 204 private final Thread[] threads; field in class:SamplingProfiler.ArrayThreadSet 205 ArrayThreadSet(Thread... threads) argument 211 public Thread[] threads() { method in class:SamplingProfiler.ArrayThreadSet 231 private Thread[] threads; field in class:SamplingProfiler.ThreadGroupThreadSet 252 public Thread[] threads() { method in class:SamplingProfiler.ThreadGroupThreadSet [all...] |
/libcore/libart/src/main/java/java/lang/ |
H A D | ThreadGroup.java | 27 * {@code ThreadGroup} is a means of organizing threads into a hierarchical structure. 45 * Weak references to the threads in this group. 51 * View of the threads. 54 private final Iterable<Thread> threads = CollectionUtils.dereferenceIterable(threadRefs, true); field in class:ThreadGroup 125 for (Thread thread : threads) { 195 * to destroy a {@code ThreadGroup} that has no threads in it. Any daemon 196 * {@code ThreadGroup} is destroyed automatically when it becomes empty (no threads 201 * threads. 211 if (threads.iterator().hasNext()) { 213 "Thread group still contains threads 266 enumerate(Thread[] threads) argument 283 enumerate(Thread[] threads, boolean recurse) argument [all...] |
H A D | Thread.java | 46 * {@link ThreadGroup}. The runtime keeps its own threads in the system thread 355 * threads or attach threads created externally. 495 * receiver - and subgroups - into the array <code>threads</code> passed as 499 * @param threads 503 public static int enumerate(Thread[] threads) { argument 505 return thread.getThreadGroup().enumerate(threads); 509 * Returns a map of all the currently live threads to their stack traces. 514 // Find out how many live threads we have. Allocate a bit more 517 Thread[] threads [all...] |
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | AbstractQueuedLongSynchronizerTest.java | 133 * Checks that sync has exactly the given queued threads. 147 * Checks that sync has exactly the given (exclusive) queued threads. 159 * Checks that sync has exactly the given (shared) queued threads. 171 * Checks that condition c has exactly the given waiter threads, 175 Thread... threads) { 177 assertHasWaitersLocked(sync, c, threads); 182 * Checks that condition c has exactly the given waiter threads. 185 Thread... threads) { 186 assertEquals(threads.length > 0, sync.hasWaiters(c)); 187 assertEquals(threads 174 assertHasWaitersUnlocked(Mutex sync, ConditionObject c, Thread... threads) argument 184 assertHasWaitersLocked(Mutex sync, ConditionObject c, Thread... threads) argument [all...] |
H A D | AbstractQueuedSynchronizerTest.java | 136 * Checks that sync has exactly the given queued threads. 150 * Checks that sync has exactly the given (exclusive) queued threads. 162 * Checks that sync has exactly the given (shared) queued threads. 174 * Checks that condition c has exactly the given waiter threads, 178 Thread... threads) { 180 assertHasWaitersLocked(sync, c, threads); 185 * Checks that condition c has exactly the given waiter threads. 188 Thread... threads) { 189 assertEquals(threads.length > 0, sync.hasWaiters(c)); 190 assertEquals(threads 177 assertHasWaitersUnlocked(Mutex sync, ConditionObject c, Thread... threads) argument 187 assertHasWaitersLocked(Mutex sync, ConditionObject c, Thread... threads) argument [all...] |
H A D | JSR166TestCase.java | 40 * helping to make sure that assertions failing in generated threads 47 * <li> All assertions in code running in generated threads must use 71 * <li> All threads generated must be joined inside each test case 98 * the smallest sensible numbers of threads, collection sizes, etc 419 * Checks that the threads do not terminate within the default 422 void assertThreadsStayAlive(Thread... threads) { argument 423 assertThreadsStayAlive(timeoutMillis(), threads); 427 * Checks that the threads do not terminate within the given millisecond delay. 429 void assertThreadsStayAlive(long millis, Thread... threads) { argument 433 for (Thread thread : threads) [all...] |
H A D | ReentrantLockTest.java | 122 * Checks that condition c has exactly the given waiter threads. 125 Thread... threads) { 127 assertEquals(threads.length > 0, lock.hasWaiters(c)); 128 assertEquals(threads.length, lock.getWaitQueueLength(c)); 129 assertEquals(threads.length == 0, lock.getWaitingThreads(c).isEmpty()); 130 assertEquals(threads.length, lock.getWaitingThreads(c).size()); 132 new HashSet<Thread>(Arrays.asList(threads))); 222 * hasQueuedThreads reports whether there are waiting threads 248 * getQueueLength reports number of waiting threads 316 * getQueuedThreads includes waiting threads 124 assertHasWaiters(PublicReentrantLock lock, Condition c, Thread... threads) argument [all...] |
H A D | ReentrantReadWriteLockTest.java | 131 * Checks that condition c has exactly the given waiter threads. 134 Thread... threads) { 136 assertEquals(threads.length > 0, lock.hasWaiters(c)); 137 assertEquals(threads.length, lock.getWaitQueueLength(c)); 138 assertEquals(threads.length == 0, lock.getWaitingThreads(c).isEmpty()); 139 assertEquals(threads.length, lock.getWaitingThreads(c).size()); 141 new HashSet<Thread>(Arrays.asList(threads))); 424 * Multiple threads can hold a read lock when not write-locked 471 * A writelock succeeds only after reading threads unlock 628 * other threads ar 133 assertHasWaiters(PublicReentrantReadWriteLock lock, Condition c, Thread... threads) argument [all...] |