Home
last modified time | relevance | path

Searched refs:threads (Results 1 – 25 of 36) sorted by relevance

12

/libcore/ojluni/src/main/java/sun/nio/ch/
DSimpleAsynchronousFileChannelImpl.java54 private final NativeThreadSet threads = new NativeThreadSet(2); field in SimpleAsynchronousFileChannelImpl
91 threads.signalAndWait(); in close()
107 int ti = threads.add(); in size()
120 threads.remove(ti); in size()
130 int ti = threads.add(); in truncate()
150 threads.remove(ti); in truncate()
156 int ti = threads.add(); in force()
168 threads.remove(ti); in force()
200 int ti = threads.add(); in implLock()
220 threads.remove(ti); in implLock()
[all …]
DFileChannelImpl.java95 private final NativeThreadSet threads = new NativeThreadSet(2); field in FileChannelImpl
152 threads.signalAndWait(); in implCloseChannel()
190 ti = threads.add(); in read()
198 threads.remove(ti); in read()
218 ti = threads.add(); in read()
226 threads.remove(ti); in read()
242 ti = threads.add(); in write()
250 threads.remove(ti); in write()
270 ti = threads.add(); in write()
278 threads.remove(ti); in write()
[all …]
/libcore/ojluni/src/main/java/java/lang/
DThreadGroup.java72 Thread threads[]; field in ThreadGroup
451 if (threads[i].isAlive()) { in enumerate()
452 list[n++] = threads[i]; in enumerate()
653 threads[i].interrupt(); in interrupt()
709 if (threads[i]==us) in stopOrSuspend()
712 threads[i].suspend(); in stopOrSuspend()
714 threads[i].stop(); in stopOrSuspend()
757 threads[i].resume(); in resume()
805 threads = null; in destroy()
905 if (threads == null) { in add()
[all …]
DThread.java1901 Thread[] threads = new Thread[count + count / 2]; in getAllStackTraces() local
1904 count = ThreadGroup.systemThreadGroup.enumerate(threads); in getAllStackTraces()
1909 StackTraceElement[] stackTrace = threads[i].getStackTrace(); in getAllStackTraces()
1910 m.put(threads[i], stackTrace); in getAllStackTraces()
/libcore/luni/src/test/java/libcore/java/nio/charset/
DCharsetTest.java54 CheckerThread[] threads = new CheckerThread[10]; in test_multiThreadedForName() local
56 threads[i] = new CheckerThread((i % 2 == 0) ? "UTF-8" : "ISO-8859-1"); in test_multiThreadedForName()
59 for (CheckerThread ct : threads) { in test_multiThreadedForName()
63 for (CheckerThread ct : threads) { in test_multiThreadedForName()
67 for (CheckerThread ct : threads) { in test_multiThreadedForName()
/libcore/ojluni/src/test/java/util/Random/
DDistinctSeeds.java66 List<Thread> threads = new ArrayList<>(); in main() local
70 threads.add(new Thread(r)); in main()
72 for (Thread thread : threads) in main()
74 for (Thread thread : threads) in main()
/libcore/luni/src/test/java/tests/security/
DSecureRandomTest.java78 int threads = 2; in testSecureRandomThreadSafety() local
79 ExecutorService executor = Executors.newFixedThreadPool(threads); in testSecureRandomThreadSafety()
81 for (int t = 0; t < threads; t++) { in testSecureRandomThreadSafety()
92 for (int i = 0; i < threads; i++) { in testSecureRandomThreadSafety()
/libcore/ojluni/src/test/java/lang/StackWalker/
DMultiThreadStackWalk.java346 WalkThread[] threads = new WalkThread[Call.WalkType.values().length*3]; in main() local
348 for (int i=0; i<threads.length; i++) { in main()
350 threads[i] = new WalkThread(test); in main()
352 for (int i=0; i<threads.length; i++) { in main()
353 threads[i].start(); in main()
355 for (int i=0; i<threads.length; i++) { in main()
356 threads[i].join(); in main()
357 if (failed == null) failed = threads[i].failed; in main()
358 else if (threads[i].failed == null) { in main()
359 failed.addSuppressed(threads[i].failed); in main()
DAcrossThreads.java71 List<Thread> threads = new ArrayList<Thread>(); in test() local
73 threads.add(new T1(walker)); in test()
74 threads.add(new T2(walker)); in test()
75 threads.add(new T3(walker)); in test()
78 threads.parallelStream().forEach(t -> { in test()
82 threads.parallelStream().forEach(t -> { in test()
DGetCallerClassTest.java90 List<Thread> threads = Arrays.asList( in test() local
97 threads.stream().forEach(Thread::start); in test()
98 threads.stream().forEach(t -> { in test()
/libcore/jsr166-tests/src/test/java/jsr166/
DPhaserTest.java309 List<Thread> threads = new ArrayList<Thread>(); in testArrive2() local
312 threads.add(newStartedThread(new CheckedRunnable() { in testArrive2()
318 for (Thread thread : threads) in testArrive2()
627 List<Thread> threads = new ArrayList<Thread>();
629 threads.add(newStartedThread(new CheckedRunnable() {
639 for (Thread thread : threads)
651 List<Thread> threads = new ArrayList<Thread>();
655 threads.add(newStartedThread(new CheckedRunnable() {
670 for (Thread thread : threads)
727 final List<Thread> threads = new ArrayList<Thread>();
[all …]
DAbstractQueuedLongSynchronizerTest.java191 Thread... threads) { in assertHasWaitersUnlocked() argument
193 assertHasWaitersLocked(sync, c, threads); in assertHasWaitersUnlocked()
201 Thread... threads) { in assertHasWaitersLocked() argument
202 assertEquals(threads.length > 0, sync.hasWaiters(c)); in assertHasWaitersLocked()
203 assertEquals(threads.length, sync.getWaitQueueLength(c)); in assertHasWaitersLocked()
204 assertEquals(threads.length == 0, sync.getWaitingThreads(c).isEmpty()); in assertHasWaitersLocked()
205 assertEquals(threads.length, sync.getWaitingThreads(c).size()); in assertHasWaitersLocked()
207 new HashSet<Thread>(Arrays.asList(threads))); in assertHasWaitersLocked()
DAbstractQueuedSynchronizerTest.java194 Thread... threads) { in assertHasWaitersUnlocked() argument
196 assertHasWaitersLocked(sync, c, threads); in assertHasWaitersUnlocked()
204 Thread... threads) { in assertHasWaitersLocked() argument
205 assertEquals(threads.length > 0, sync.hasWaiters(c)); in assertHasWaitersLocked()
206 assertEquals(threads.length, sync.getWaitQueueLength(c)); in assertHasWaitersLocked()
207 assertEquals(threads.length == 0, sync.getWaitingThreads(c).isEmpty()); in assertHasWaitersLocked()
208 assertEquals(threads.length, sync.getWaitingThreads(c).size()); in assertHasWaitersLocked()
210 new HashSet<Thread>(Arrays.asList(threads))); in assertHasWaitersLocked()
DExecutorsTest.java289 List<Thread> threads = new ArrayList<Thread>(); in testTimedCallable() local
291 threads.add(newStartedThread(new CheckedRunnable() { in testTimedCallable()
297 for (Thread thread : threads) in testTimedCallable()
DReentrantLockTest.java140 Thread... threads) { in assertHasWaiters() argument
142 assertEquals(threads.length > 0, lock.hasWaiters(c)); in assertHasWaiters()
143 assertEquals(threads.length, lock.getWaitQueueLength(c)); in assertHasWaiters()
144 assertEquals(threads.length == 0, lock.getWaitingThreads(c).isEmpty()); in assertHasWaiters()
145 assertEquals(threads.length, lock.getWaitingThreads(c).size()); in assertHasWaiters()
147 new HashSet<Thread>(Arrays.asList(threads))); in assertHasWaiters()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DPhaserTest.java333 List<Thread> threads = new ArrayList<>(); in testArrive2() local
336 threads.add(newStartedThread(new CheckedRunnable() { in testArrive2()
342 for (Thread thread : threads) in testArrive2()
651 List<Thread> threads = new ArrayList<>();
653 threads.add(newStartedThread(new CheckedRunnable() {
663 for (Thread thread : threads)
675 List<Thread> threads = new ArrayList<>();
679 threads.add(newStartedThread(new CheckedRunnable() {
694 for (Thread thread : threads)
751 final List<Thread> threads = new ArrayList<>();
[all …]
DAbstractQueuedSynchronizerTest.java222 Thread... threads) { in assertHasWaitersUnlocked() argument
224 assertHasWaitersLocked(sync, c, threads); in assertHasWaitersUnlocked()
232 Thread... threads) { in assertHasWaitersLocked() argument
233 assertEquals(threads.length > 0, sync.hasWaiters(c)); in assertHasWaitersLocked()
234 assertEquals(threads.length, sync.getWaitQueueLength(c)); in assertHasWaitersLocked()
235 assertEquals(threads.length == 0, sync.getWaitingThreads(c).isEmpty()); in assertHasWaitersLocked()
236 assertEquals(threads.length, sync.getWaitingThreads(c).size()); in assertHasWaitersLocked()
238 new HashSet<Thread>(Arrays.asList(threads))); in assertHasWaitersLocked()
DAbstractQueuedLongSynchronizerTest.java219 Thread... threads) { in assertHasWaitersUnlocked() argument
221 assertHasWaitersLocked(sync, c, threads); in assertHasWaitersUnlocked()
229 Thread... threads) { in assertHasWaitersLocked() argument
230 assertEquals(threads.length > 0, sync.hasWaiters(c)); in assertHasWaitersLocked()
231 assertEquals(threads.length, sync.getWaitQueueLength(c)); in assertHasWaitersLocked()
232 assertEquals(threads.length == 0, sync.getWaitingThreads(c).isEmpty()); in assertHasWaitersLocked()
233 assertEquals(threads.length, sync.getWaitingThreads(c).size()); in assertHasWaitersLocked()
235 new HashSet<Thread>(Arrays.asList(threads))); in assertHasWaitersLocked()
DExecutorsTest.java312 List<Thread> threads = new ArrayList<>(); in testTimedCallable() local
314 threads.add(newStartedThread(new CheckedRunnable() { in testTimedCallable()
320 for (Thread thread : threads) in testTimedCallable()
/libcore/luni/src/test/java/tests/support/
DThreadPool.java79 Thread[] threads = new Thread[activeCount()]; in join() local
80 int count = enumerate(threads); in join()
83 threads[i].join(); in join()
/libcore/luni/src/test/java/libcore/java/net/
DConcurrentCloseTest.java126 final ArrayList<Thread> threads = new ArrayList<Thread>(); in test_read_multiple() local
144 threads.add(t); in test_read_multiple()
146 for (Thread t : threads) { in test_read_multiple()
150 for (Thread t : threads) { in test_read_multiple()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DHttpCookieTest.java989 ParseThread[] threads = new ParseThread[10];
991 for (int i = 0; i < threads.length; i++) {
992 threads[i] = new ParseThread();
996 for (ParseThread thread : threads) {
1001 for (ParseThread thread : threads) {
1005 for (ParseThread thread : threads) {
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DObjectTest.java146 List<TestThread> threads = new ArrayList<>(); in test_notify() local
149 threads.add(thread); in test_notify()
/libcore/ojluni/annotations/hiddenapi/sun/nio/ch/
DFileChannelImpl.java294 private final sun.nio.ch.NativeThreadSet threads; field in FileChannelImpl
297 threads = null;
/libcore/luni/src/test/java/libcore/java/util/regex/
DOldMatcherTest.java606 ArrayList<Thread> threads = new ArrayList<Thread>(); in testConcurrentMatcherAccess() local
626 threads.add(t); in testConcurrentMatcherAccess()
629 for (Thread t : threads) { in testConcurrentMatcherAccess()
632 for (Thread t : threads) { in testConcurrentMatcherAccess()

12