/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/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/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 | 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()
|
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()
|
/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/libart/src/main/java/java/lang/ |
D | Daemons.java | 105 private Thread thread; field in Daemons.Daemon 124 if (thread != null) { in startInternal() 127 thread = new Thread(ThreadGroup.systemThreadGroup, this, name); in startInternal() 128 thread.setDaemon(true); in startInternal() 129 thread.setSystemDaemon(true); in startInternal() 130 thread.start(); in startInternal() 162 return thread != null; in isRunning() 166 interrupt(thread); in interrupt() 169 public synchronized void interrupt(Thread thread) { in interrupt() argument 170 if (thread == null) { in interrupt() [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/locks/ |
D | LockSupport.java | 175 public static void unpark(Thread thread) { in unpark() argument 176 if (thread != null) in unpark() 177 U.unpark(thread); in unpark() 419 static final long getThreadId(Thread thread) { in getThreadId() argument 420 return U.getLong(thread, TID); in getThreadId()
|
D | AbstractOwnableSynchronizer.java | 73 protected final void setExclusiveOwnerThread(Thread thread) { in setExclusiveOwnerThread() argument 74 exclusiveOwnerThread = thread; in setExclusiveOwnerThread()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | OldServerSocketChannelTest.java | 97 MyThread thread = new MyThread(); in test_accept_Block_NoConnect_interrupt() local 98 thread.start(); in test_accept_Block_NoConnect_interrupt() 101 thread.interrupt(); in test_accept_Block_NoConnect_interrupt() 105 if (thread.errMsg != null) { in test_accept_Block_NoConnect_interrupt() 106 fail(thread.errMsg); in test_accept_Block_NoConnect_interrupt()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Timer.java | 108 private final TimerThread thread = new TimerThread(queue); field in Timer 121 thread.newTasksMayBeScheduled = false; 167 thread.setName(name); in Timer() 168 thread.start(); in Timer() 182 thread.setName(name); in Timer() 183 thread.setDaemon(isDaemon); in Timer() 184 thread.start(); in Timer() 404 if (!thread.newTasksMayBeScheduled) in sched() 438 thread.newTasksMayBeScheduled = false; in cancel()
|
/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()
|
/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/ |
D | FutureTask.java | 352 volatile Thread thread; field in FutureTask.WaitNode 354 WaitNode() { thread = Thread.currentThread(); } in WaitNode() 366 Thread t = q.thread; in finishCompletion() 368 q.thread = null; in finishCompletion() 409 q.thread = null; in awaitDone() 463 node.thread = null; in removeWaiter() 468 if (q.thread != null) in removeWaiter() 472 if (pred.thread == null) // check for race in removeWaiter()
|
D | Phaser.java | 974 (t = q.thread) != null) { in releaseWaiters() 975 q.thread = null; in releaseWaiters() 996 if (q == null || ((t = q.thread) != null && q.phase == p)) in abortWait() 999 q.thread = null; in abortWait() 1072 if (node.thread != null) in internalAwaitAdvance() 1073 node.thread = null; // avoid need for unpark() in internalAwaitAdvance() 1094 volatile Thread thread; // nulled to cancel wait field in Phaser.QNode 1105 thread = Thread.currentThread(); in QNode() 1109 if (thread == null) in isReleasable() 1112 thread = null; in isReleasable() [all …]
|
/libcore/ojluni/src/main/native/ |
D | NativeThread.c | 106 NativeThread_signal(JNIEnv *env, jclass cl, jlong thread) in NativeThread_signal() argument 110 ret = thr_kill((thread_t)thread, INTERRUPT_SIGNAL); in NativeThread_signal() 112 ret = pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL); in NativeThread_signal()
|
/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 …]
|