Searched refs:thread (Results 1 - 25 of 55) sorted by relevance

123

/libcore/ojluni/src/main/java/java/io/
H A DSerialCallbackContext.java33 * This context keeps track of the thread it was constructed on, and allows
35 * or writeFields which must be invoked on the same thread before the class's
37 * If not set to the current thread, the getObj method throws NotActiveException.
44 * As this only works in one thread, we do not need to worry about thread-safety.
46 private Thread thread; field in class:SerialCallbackContext
51 this.thread = Thread.currentThread();
64 if (thread != Thread.currentThread()) {
68 thread = null;
72 thread
[all...]
/libcore/dalvik/src/main/java/dalvik/system/profiler/
H A DThreadSampler.java23 * between portable and VM specific implementations of thread
34 * Return a stack trace for the current thread limited by the
36 * return null if no sample is availble for the thread, which may
37 * happen in cases such as thread termination. The resulting array
43 public StackTraceElement[] getStackTrace(Thread thread); argument
H A DSamplingProfiler.java38 * SamplingProfiler}. It samples the current thread's stack to a depth
94 * Real hprof output examples don't start the thread and trace
105 * thread start and end events.
120 * be thread safe, have a single mutable instance would need to be
127 * StackTraceElement} array for a given thread. The array is
135 * thread collector.
147 * @param threadSet The thread set specifies which threads to
323 * restarted, there is no thread safe way to access the data.
335 * At every sample time, it asks the thread set for the set
336 * of threads to sample. It maintains a history of thread creatio
394 recordStackTrace(Thread thread, StackTraceElement[] stackFrames) argument
452 addStartThread(Thread thread) argument
478 addEndThread(Thread thread) argument
[all...]
H A DPortableThreadSampler.java33 @Override public StackTraceElement[] getStackTrace(Thread thread) { argument
34 StackTraceElement[] stackFrames = thread.getStackTrace();
H A DDalvikThreadSampler.java39 @Override public StackTraceElement[] getStackTrace(Thread thread) { argument
40 int count = VMStack.fillStackTraceElements(thread, mutableStackTraceElements[depth]);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DLoadLocaleProviderTestHelper.java29 Thread thread = new Thread(this);
30 thread.setContextClassLoader(loader);
31 thread.start();
32 thread.join();
/libcore/luni/src/main/java/java/util/concurrent/locks/
H A DAbstractOwnableSynchronizer.java10 * A synchronizer that may be exclusively owned by a thread. This
38 * Sets the thread that currently owns exclusive access.
39 * A {@code null} argument indicates that no thread owns access.
42 * @param thread the owner thread
44 protected final void setExclusiveOwnerThread(Thread thread) { argument
45 exclusiveOwnerThread = thread;
49 * Returns the thread last set by {@code setExclusiveOwnerThread},
52 * @return the owner thread
H A DLockSupport.java10 * Basic thread blocking primitives for creating locks and other
13 * <p>This class associates, with each thread that uses it, a permit
29 * between one thread invoking {@code park} and another thread trying
32 * thread was interrupted, and timeout versions are supported. The
42 * the thread is blocked to permit monitoring and diagnostic tools to
61 * where no actions by the thread publishing a request to unpark,
63 * Because only one permit is associated with each thread, any
65 * loading, could lead to an unresponsive thread (a "lost unpark").
77 * // publish current thread fo
125 unpark(Thread thread) argument
[all...]
/libcore/luni/src/test/java/libcore/java/io/
H A DInterruptedStreamTest.java40 * Test that interrupting a thread blocked on I/O causes that thread to throw
121 Thread thread = interruptMeLater();
127 confirmInterrupted(thread);
132 Thread thread = interruptMeLater();
138 confirmInterrupted(thread);
143 Thread thread = interruptMeLater();
149 confirmInterrupted(thread);
154 Thread thread = interruptMeLater();
162 confirmInterrupted(thread);
208 confirmInterrupted(Thread thread) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/logging/
H A DOldLogRecordTest.java52 // Create and start the thread
53 MockThread thread = new MockThread();
54 thread.start();
56 thread.join();
70 assertTrue(lr.getThreadID() != thread.lr.getThreadID());
72 assertTrue(thread.lr.getThreadID() != thread2.lr.getThreadID());
76 public LogRecord lr = null; //will be update by the thread
83 lr = new LogRecord(Level.CONFIG, "msg thread");
/libcore/luni/src/test/java/libcore/java/lang/
H A DOldInheritableThreadLocalTest.java38 Thread thread = new Thread() {
43 thread.start();
44 thread.join();
H A DOldThreadTest.java52 assertTrue("Constructed incorrect thread", (st.getThreadGroup() == tg)
150 fail("setDaemon() must throw exception for started thread");
157 Thread thread = new Thread() {
167 thread.start();
169 return thread;
391 Thread thread = launchFiveSecondDummyThread();
400 thread.stop();
418 Thread thread = new Thread() {
428 thread.start();
436 thread
[all...]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
H A DTestThread.java34 Thread thread = null;
38 thread = new Thread(this);
39 thread.start();
41 thread.join();
H A DCipherThread.java75 Thread thread = null;
83 thread = new Thread(this);
84 thread.start();
86 thread.join();
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DOldServerSocketChannelTest.java97 MyThread thread = new MyThread();
98 thread.start();
101 thread.interrupt();
105 if (thread.errMsg != null) {
106 fail(thread.errMsg);
/libcore/libart/src/main/java/java/lang/
H A DDaemons.java62 private Thread thread; field in class:Daemons.Daemon
70 if (thread != null) {
73 thread = new Thread(ThreadGroup.systemThreadGroup, this, name);
74 thread.setDaemon(true);
75 thread.start();
81 * Returns true while the current thread should continue to run; false
85 return thread != null;
89 interrupt(thread);
92 public synchronized void interrupt(Thread thread) { argument
93 if (thread
418 interrupt(Thread thread) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DThreadGroupTest.java181 Thread noOp = new Thread(testRoot, null, "no-op thread") {
188 // Wait for the no-op thread to run inside daemon ThreadGroup
197 assertTrue("Daemon group should have been destroyed already when last thread died", passed);
200 noOp = new Thread(testRoot, null, "no-op thread") {
211 // Has to execute the next lines in an interval < the sleep interval of the no-op thread
221 // But after the thread dies, we have to be able to destroy the thread group
284 // To maintain the invariant that a thread in the Vector is parent
511 Thread thread = new Thread(testRoot, null, "suicidal thread") {
762 waitForThreadToDieUninterrupted(Thread thread) argument
775 private Thread thread; field in class:ThreadGroupTest.TestThreadDefaultUncaughtExceptionHandler
778 uncaughtException(Thread thread, Throwable ex) argument
784 assertWasCalled(Thread thread, Throwable ex) argument
[all...]
H A DProcessManagerTest.java31 Thread thread = null; field in class:ProcessManagerTest
60 thread = new Thread() {
85 thread.interrupt();
88 thread.start();
101 thread.interrupt();
138 Thread thread = new Thread() {
153 thread.setDaemon(true);
154 thread.start();
/libcore/ojluni/src/main/java/sun/nio/ch/
H A DSinkChannelImpl.java49 // ID of native thread doing write, for signalling
50 private volatile long thread = 0; field in class:SinkChannelImpl
52 // Lock held by current reading thread
55 // Lock held by any thread that modifies the state fields declared below
89 long th = thread;
166 thread = NativeThread.current();
172 thread = 0;
189 thread = NativeThread.current();
195 thread = 0;
H A DSourceChannelImpl.java50 // ID of native thread doing read, for signalling
51 private volatile long thread = 0; field in class:SourceChannelImpl
53 // Lock held by current reading thread
56 // Lock held by any thread that modifies the state fields declared below
90 long th = thread;
170 thread = NativeThread.current();
176 thread = 0;
201 thread = NativeThread.current();
207 thread = 0;
/libcore/ojluni/src/main/java/java/util/
H A DTimer.java32 * background thread. Tasks may be scheduled for one-time execution, or for
36 * thread that is used to execute all of the timer's tasks, sequentially.
38 * to complete, it "hogs" the timer's task execution thread. This can, in
45 * execution thread terminates gracefully (and becomes subject to garbage
47 * default, the task execution thread does not run as a <i>daemon thread</i>,
49 * wants to terminate a timer's task execution thread rapidly, the caller
52 * <p>If the timer's task execution thread terminates unexpectedly, for
58 * <p>This class is thread-safe: multiple threads can share a single
67 * ScheduledThreadPoolExecutor} which is a thread poo
101 private final TimerThread thread = new TimerThread(queue); field in class:Timer
[all...]
/libcore/luni/src/main/java/java/util/concurrent/
H A DFutureTask.java77 /** The thread running the callable; CASed during run() */
325 volatile Thread thread; field in class:FutureTask.WaitNode
327 WaitNode() { thread = Thread.currentThread(); }
339 Thread t = q.thread;
341 q.thread = null;
382 q.thread = null;
437 node.thread = null;
442 if (q.thread != null)
446 if (pred.thread == null) // check for race
H A DPhaser.java63 * waiting thread is interrupted. Interruptible and timeout
478 * parent, and initial phase number 0. Any thread using this
714 * @throws InterruptedException if thread interrupted while waiting
749 * @throws InterruptedException if thread interrupted while waiting
941 Thread t; // its thread
946 (t = q.thread) != null) {
947 q.thread = null;
968 if (q == null || ((t = q.thread) != null && q.phase == p))
971 q.thread = null;
985 * avoid it when threads regularly arrive: When a thread i
1063 volatile Thread thread; // nulled to cancel wait field in class:Phaser.QNode
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DOldDatagramPacketTest.java32 Thread thread = new Thread(new Runnable() {
40 System.out.println("thread exception: " + e);
44 thread.start();
/libcore/ojluni/src/main/native/
H A DNativeThread.c77 NativeThread_signal(JNIEnv *env, jclass cl, jlong thread) argument
79 if (pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL))

Completed in 635 milliseconds

123