/libcore/ojluni/src/main/java/java/io/ |
D | SerialCallbackContext.java | 46 private Thread thread; field in SerialCallbackContext 51 this.thread = Thread.currentThread(); in SerialCallbackContext() 64 if (thread != null && thread != Thread.currentThread()) { in check() 66 "expected thread: " + thread + ", but got: " + Thread.currentThread()); in check() 71 if (thread != Thread.currentThread()) { in checkAndSetUsed() 75 thread = null; in checkAndSetUsed() 79 thread = null; in setUsed()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | InterruptedStreamTest.java | 121 Thread thread = interruptMeLater(); in testInterruptInputStream() local 127 confirmInterrupted(thread); in testInterruptInputStream() 132 Thread thread = interruptMeLater(); in testInterruptReader() local 138 confirmInterrupted(thread); in testInterruptReader() 143 Thread thread = interruptMeLater(); in testInterruptReadableChannel() local 149 confirmInterrupted(thread); in testInterruptReadableChannel() 154 Thread thread = interruptMeLater(); in testInterruptOutputStream() local 162 confirmInterrupted(thread); in testInterruptOutputStream() 167 Thread thread = interruptMeLater(); in testInterruptWriter() local 175 confirmInterrupted(thread); in testInterruptWriter() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | ThreadTest.java | 169 Thread thread = new Thread(); in setPriority_unstarted() local 170 checkSetPriority_inBounds_succeeds(thread); in setPriority_unstarted() 171 checkSetPriority_outOfBounds_fails(thread); in setPriority_unstarted() 177 Thread thread = new Thread("starting thread") { in setPriority_starting() local 181 int priority = thread.getPriority() + 1; in setPriority_starting() 185 thread.setPriority(priority); in setPriority_starting() 186 thread.start(); in setPriority_starting() 187 assertEquals(priority, thread.getPriority()); in setPriority_starting() 189 thread.join(); in setPriority_starting() 220 private static void checkSetPriority_inBounds_succeeds(Thread thread) { in checkSetPriority_inBounds_succeeds() argument [all …]
|
D | OldThreadGroupTest.java | 129 for(MyThread thread : newThreads) { in test_enumerateLThreadArrayLZtest_enumerateLThreadArrayLZ() 130 thread.start(); in test_enumerateLThreadArrayLZtest_enumerateLThreadArrayLZ() 143 for(MyThread thread : newThreads) { in test_enumerateLThreadArrayLZtest_enumerateLThreadArrayLZ() 144 thread.interrupt(); in test_enumerateLThreadArrayLZtest_enumerateLThreadArrayLZ() 281 Thread thread = launchFiveSecondFakeThread(group); in test_resume() local 297 Thread thread = new Thread(group, "Bar") { in launchFiveSecondFakeThread() local 307 thread.start(); in launchFiveSecondFakeThread() 309 return thread; in launchFiveSecondFakeThread() 337 for (MyThread thread : myThreads) { in tearDown() 338 thread.interrupt(); in tearDown() [all …]
|
D | ThreadGroupTest.java | 95 Thread thread = createHangThread(threadGroup); in suspend_shouldThrowUnsupportedOperationException() local 96 thread.start(); in suspend_shouldThrowUnsupportedOperationException() 104 thread.join(); in suspend_shouldThrowUnsupportedOperationException() 112 Thread thread = createHangThread(threadGroup); in stop_shouldThrowUnsupportedOperationException() local 113 thread.start(); in stop_shouldThrowUnsupportedOperationException() 121 thread.join(); in stop_shouldThrowUnsupportedOperationException()
|
D | OldInheritableThreadLocalTest.java | 38 Thread thread = new Thread() { in test_Ljava_lang_InheritableThreadLocal() local 43 thread.start(); in test_Ljava_lang_InheritableThreadLocal() 44 thread.join(); in test_Ljava_lang_InheritableThreadLocal()
|
D | OldThreadTest.java | 158 Thread thread = new Thread() { in launchFiveSecondFakeThread() local 168 thread.start(); in launchFiveSecondFakeThread() 170 return thread; in launchFiveSecondFakeThread() 392 Thread thread = launchFiveSecondFakeThread(); in test_stop() local 401 thread.stop(); in test_stop() 419 Thread thread = new Thread() { in test_stopLjava_lang_Throwable_subtest0() local 429 thread.start(); in test_stopLjava_lang_Throwable_subtest0() 437 thread.stop(new Exception("Oops!")); in test_stopLjava_lang_Throwable_subtest0() 445 Thread thread = launchFiveSecondFakeThread(); in test_suspend() local 454 thread.suspend(); in test_suspend()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ObjectTest.java | 148 TestThread thread = new TestThread("TestThread " + i); in test_notify() local 149 threads.add(thread); in test_notify() 150 thread.start(); in test_notify() 293 TestThread thread = new TestThread(); in test_wait() local 295 thread.status = 0; in test_wait() 297 thread.start(); in test_wait() 301 assertEquals("Thread woke too early. (status=" + thread.status + ")", in test_wait() 302 0, thread.status); in test_wait() 306 assertEquals("Thread did not get notified. (status=" + thread.status + ")", in test_wait() 307 1, thread.status); in test_wait() [all …]
|
D | ThreadGroupTest.java | 512 Thread thread = new Thread(testRoot, null, "suicidal thread") { in test_uncaughtException_threadDeath() local 518 thread.start(); in test_uncaughtException_threadDeath() 519 waitForThreadToDieUninterrupted(thread); in test_uncaughtException_threadDeath() 520 testThreadDefaultUncaughtExceptionHandler.assertWasCalled(thread, threadDeath); in test_uncaughtException_threadDeath() 546 Thread thread = new Thread(testRoot, null, "no-op thread"); in test_uncaughtException_naturalDeath() local 547 thread.start(); in test_uncaughtException_naturalDeath() 548 waitForThreadToDieUninterrupted(thread); in test_uncaughtException_naturalDeath() 580 Thread thread = new Thread(testRoot, null, "RuntimeException thread") { in test_uncaughtException_runtimeException() local 586 thread.start(); in test_uncaughtException_runtimeException() 587 waitForThreadToDieUninterrupted(thread); in test_uncaughtException_runtimeException() [all …]
|
D | ProcessManagerTest.java | 31 Thread thread = null; field in ProcessManagerTest 60 thread = new Thread() { in testSleep() 85 thread.interrupt(); in testSleep() 88 thread.start(); in testSleep() 101 thread.interrupt(); in testSleep() 140 Thread thread = new Thread() { in logErrors() local 155 thread.setDaemon(true); in logErrors() 156 thread.start(); in logErrors()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | LoadLocaleProviderTestHelper.java | 29 Thread thread = new Thread(this); in LoadLocaleProviderTestHelper() local 30 thread.setContextClassLoader(loader); in LoadLocaleProviderTestHelper() 31 thread.start(); in LoadLocaleProviderTestHelper() 32 thread.join(); in LoadLocaleProviderTestHelper()
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | TestUtils.java | 28 public static void joinThreadOrFail(long timeoutMillis, Thread thread) { in joinThreadOrFail() argument 30 thread.join(timeoutMillis); in joinThreadOrFail() 34 if (thread.getState() != Thread.State.TERMINATED) { in joinThreadOrFail() 35 thread.interrupt(); in joinThreadOrFail()
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
D | OldLogRecordTest.java | 53 MockThread thread = new MockThread(); in testGetSetThreadID_DifferentThread() local 54 thread.start(); in testGetSetThreadID_DifferentThread() 56 thread.join(); in testGetSetThreadID_DifferentThread() 70 assertTrue(lr.getThreadID() != thread.lr.getThreadID()); in testGetSetThreadID_DifferentThread() 72 assertTrue(thread.lr.getThreadID() != thread2.lr.getThreadID()); in testGetSetThreadID_DifferentThread()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
D | TestThread.java | 34 Thread thread = null; in launcher() local 38 thread = new Thread(this); in launcher() 39 thread.start(); in launcher() 41 thread.join(); in launcher()
|
D | CipherThread.java | 75 Thread thread = null; in launcher() local 83 thread = new Thread(this); in launcher() 84 thread.start(); in launcher() 86 thread.join(); in launcher()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Timer.java | 108 private final TimerThread thread = new TimerThread(queue); field in Timer 120 thread.newTasksMayBeScheduled = false; 166 thread.setName(name); in Timer() 167 thread.start(); in Timer() 181 thread.setName(name); in Timer() 182 thread.setDaemon(isDaemon); in Timer() 183 thread.start(); in Timer() 403 if (!thread.newTasksMayBeScheduled) in sched() 437 thread.newTasksMayBeScheduled = false; in cancel()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | SinkChannelImpl.java | 50 private volatile long thread = 0; field in SinkChannelImpl 89 long th = thread; in implCloseSelectableChannel() 165 thread = NativeThread.current(); in write() 171 thread = 0; in write() 188 thread = NativeThread.current(); in write() 194 thread = 0; in write()
|
D | SourceChannelImpl.java | 51 private volatile long thread = 0; field in SourceChannelImpl 90 long th = thread; in implCloseSelectableChannel() 170 thread = NativeThread.current(); in read() 176 thread = 0; in read() 201 thread = NativeThread.current(); in read() 207 thread = 0; in read()
|
/libcore/ojluni/src/main/java/java/util/concurrent/locks/ |
D | AbstractOwnableSynchronizer.java | 73 protected final void setExclusiveOwnerThread(Thread thread) { in setExclusiveOwnerThread() argument 74 exclusiveOwnerThread = thread; in setExclusiveOwnerThread()
|
D | AbstractQueuedLongSynchronizer.java | 195 node.thread = null; in setHead() 228 LockSupport.unpark(s.thread); in unparkSuccessor() 313 node.thread = null; in cancelAcquire() 340 pred.thread != null) { in cancelAcquire() 967 s.prev == head && (st = s.thread) != null) || in fullGetFirstQueuedThread() 969 s.prev == head && (st = s.thread) != null)) in fullGetFirstQueuedThread() 982 Thread t = p.thread; in fullGetFirstQueuedThread() 999 public final boolean isQueued(Thread thread) { in isQueued() argument 1000 if (thread == null) in isQueued() 1003 if (p.thread == thread) in isQueued() [all …]
|
D | LockSupport.java | 154 public static void unpark(Thread thread) { in unpark() argument 155 if (thread != null) in unpark() 156 U.unpark(thread); in unpark()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | FutureTask.java | 354 volatile Thread thread; field in FutureTask.WaitNode 356 WaitNode() { thread = Thread.currentThread(); } in WaitNode() 368 Thread t = q.thread; in finishCompletion() 370 q.thread = null; in finishCompletion() 411 q.thread = null; in awaitDone() 466 node.thread = null; in removeWaiter() 471 if (q.thread != null) in removeWaiter() 475 if (pred.thread == null) // check for race in removeWaiter()
|
D | Phaser.java | 975 (t = q.thread) != null) { in releaseWaiters() 976 q.thread = null; in releaseWaiters() 997 if (q == null || ((t = q.thread) != null && q.phase == p)) in abortWait() 1000 q.thread = null; in abortWait() 1070 if (node.thread != null) in internalAwaitAdvance() 1071 node.thread = null; // avoid need for unpark() in internalAwaitAdvance() 1092 volatile Thread thread; // nulled to cancel wait field in Phaser.QNode 1103 thread = Thread.currentThread(); in QNode() 1107 if (thread == null) in isReleasable() 1110 thread = null; in isReleasable() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | JSR166TestCase.java | 247 Thread thread = new Thread(checkForWedgedTest, "checkForWedgedTest"); 248 thread.setDaemon(true); 249 thread.start(); in thread.start() 682 Thread thread = survivors[i]; in checkForkJoinPoolThreadLeaks() local 683 String name = thread.getName(); in checkForkJoinPoolThreadLeaks() 686 thread.join(LONG_DELAY_MS); in checkForkJoinPoolThreadLeaks() 687 if (thread.isAlive()) in checkForkJoinPoolThreadLeaks() 689 thread); in checkForkJoinPoolThreadLeaks() 983 void assertThreadStaysAlive(Thread thread) { 984 assertThreadStaysAlive(thread, timeoutMillis()); [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ |
D | ThreadsTest.java | 283 private final Thread thread; field in ThreadsTest.WaitAndUnpark 285 public WaitAndUnpark(CyclicBarrier barrier, long waitMillis, Thread thread) { in WaitAndUnpark() argument 288 this.thread = thread; in WaitAndUnpark() 303 UNSAFE.unpark(thread); in run()
|