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

/libcore/dalvik/src/main/java/dalvik/system/profiler/
H A DDalvikThreadSampler.java39 @Override public StackTraceElement[] getStackTrace(Thread thread) { argument
40 int count = VMStack.fillStackTraceElements(thread, mutableStackTraceElements[depth]);
H A DPortableThreadSampler.java33 @Override public StackTraceElement[] getStackTrace(Thread thread) { argument
34 StackTraceElement[] stackFrames = thread.getStackTrace();
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...]
/libcore/luni/src/main/java/java/util/concurrent/locks/
H A DLockSupport.java11 * Basic thread blocking primitives for creating locks and other
14 * <p>This class associates, with each thread that uses it, a permit
26 * between one thread invoking {@code park} and another thread trying
29 * thread was interrupted, and timeout versions are supported. The
39 * the thread is blocked to permit monitoring and diagnostic tools to
56 * permit is associated with each thread, any intermediary uses of
111 * Makes available the permit for the given thread, if it
112 * was not already available. If the thread was blocked on
116 * thread ha
121 unpark(Thread thread) argument
[all...]
H A DReentrantLock.java17 * <p>A {@code ReentrantLock} is <em>owned</em> by the thread last
18 * successfully locking, but not yet unlocking it. A thread invoking
20 * the lock is not owned by another thread. The method will return
21 * immediately if the current thread already owns the lock. This can
28 * thread. Otherwise this lock does not guarantee any particular
34 * fairness of thread scheduling. Thus, one of many threads using a
71 * the same thread. Attempts to exceed this limit result in
134 // we don't need to do so to check if current thread is owner
244 * <p>Acquires the lock if it is not held by another thread and returns
247 * <p>If the current thread alread
615 hasQueuedThread(Thread thread) argument
[all...]
H A DReentrantReadWriteLock.java35 * is released, either the longest-waiting single writer thread will
40 * <p>A thread that tries to acquire a fair read lock (non-reentrantly)
42 * writer thread. The thread will not acquire the read lock until
43 * after the oldest currently waiting writer thread has acquired and
49 * <p>A thread that tries to acquire a fair write lock (non-reentrantly)
63 * thread have been released.
120 * // Recheck state because another thread might have
245 * A counter for per-thread read hold counts.
266 * The number of reentrant read locks held by current thread
1336 hasQueuedThread(Thread thread) argument
[all...]
H A DAbstractQueuedLongSynchronizer.java57 * information about a thread in the predecessor of its node. A
58 * "status" field in each node keeps track of whether a thread
62 * thread. The status field does NOT control whether threads are
63 * granted locks etc though. A thread may try to acquire if it is
66 * contender thread may need to rewait.
92 * The thread id for each node is kept in its own node, so a
94 * next link to determine which thread it is. Determination of
135 /** waitStatus value to indicate thread has cancelled */
137 /** waitStatus value to indicate successor's thread needs unparking */
139 /** waitStatus value to indicate thread i
215 volatile Thread thread; field in class:AbstractQueuedLongSynchronizer.Node
254 Node(Thread thread, Node mode) argument
259 Node(Thread thread, int waitStatus) argument
1190 isQueued(Thread thread) argument
[all...]
H A DAbstractQueuedSynchronizer.java48 * waiting thread (if one exists) must also determine whether it can
59 * held with respect to the current thread, method {@link #release}
76 * thread queues. Typical subclasses requiring serializability will
97 * must be internally thread-safe, and should in general be short and
103 * AbstractOwnableSynchronizer} useful to keep track of the thread
115 * <em>enqueue thread if it is not already queued</em>;
116 * <em>possibly block current thread</em>;
121 * <em>unblock the first queued thread</em>;
127 * enqueuing, a newly acquiring thread may <em>barge</em> ahead of
133 * #getFirstQueuedThread} does not return the current thread
445 volatile Thread thread; field in class:AbstractQueuedSynchronizer.Node
484 Node(Thread thread, Node mode) argument
489 Node(Thread thread, int waitStatus) argument
1420 isQueued(Thread thread) argument
[all...]
/libcore/luni/src/test/java/tests/api/java/lang/
H A DProcessManagerTest.java33 Thread thread = null; field in class:ProcessManagerTest
62 thread = new Thread() {
87 thread.interrupt();
90 thread.start();
103 thread.interrupt();
140 Thread thread = new Thread() {
155 thread.setDaemon(true);
156 thread.start();
/libcore/libdvm/src/main/java/java/lang/
H A DVMThread.java20 Thread thread; field in class:VMThread
24 thread = t;
43 VMThread.create(thread, stackSize);
73 * Tell the VM that the thread's name has changed. This is useful for
H A DDaemons.java56 private Thread thread; field in class:Daemons.Daemon
59 if (thread != null) {
62 thread = new Thread(ThreadGroup.mSystem, this,
64 thread.setDaemon(true);
65 thread.start();
71 * Returns true while the current thread should continue to run; false
75 return thread != null;
79 if (thread == null) {
82 thread.interrupt();
86 * Waits for the runtime thread t
[all...]
H A DThreadGroup.java28 * This class is obsolete. See <i>Effective Java</i> Item 73, "Avoid thread groups" for details.
73 * will be child of the {@code ThreadGroup} to which the calling thread belongs.
117 * Returns the number of running {@code Thread}s which are children of this thread group,
125 for (Thread thread : threads) {
126 if (thread.isAlive()) {
157 * Adds a {@code ThreadGroup} to this thread group.
194 * Destroys this thread group and recursively all its subgroups. It is only legal
197 * or thread groups in it).
199 * @throws IllegalThreadStateException if this thread group or any of its
235 * Auxiliary method that destroys this thread grou
703 addThread(Thread thread) argument
715 removeThread(Thread thread) argument
[all...]
H A DThread.java45 * has at least one thread running when it is started, the main thread, in the main
46 * {@link ThreadGroup}. The runtime keeps its own threads in the system thread
49 * <p>There are two ways to execute code in a new thread.
55 * <p>Each {@code Thread} has an integer priority that affect how the thread is
56 * scheduled by the OS. A new thread inherits the priority of its parent.
57 * A thread's priority can be set using the {@link #setPriority(int)} method.
75 * A representation of a thread's state. A given thread may only be in one
80 * The thread ha
1110 uncaughtException(Thread thread, Throwable ex) argument
[all...]
/libcore/libart/src/main/java/java/lang/
H A DDaemons.java60 private Thread thread; field in class:Daemons.Daemon
63 if (thread != null) {
66 thread = new Thread(ThreadGroup.systemThreadGroup, this, getClass().getSimpleName());
67 thread.setDaemon(true);
68 thread.start();
74 * Returns true while the current thread should continue to run; false
78 return thread != null;
82 if (thread == null) {
85 thread.interrupt();
89 * Waits for the runtime thread t
[all...]
H A DThreadGroup.java28 * This class is obsolete. See <i>Effective Java</i> Item 73, "Avoid thread groups" for details.
73 * will be child of the {@code ThreadGroup} to which the calling thread belongs.
117 * Returns the number of running {@code Thread}s which are children of this thread group,
125 for (Thread thread : threads) {
126 if (thread.isAlive()) {
157 * Adds a {@code ThreadGroup} to this thread group.
194 * Destroys this thread group and recursively all its subgroups. It is only legal
197 * or thread groups in it).
199 * @throws IllegalThreadStateException if this thread group or any of its
235 * Auxiliary method that destroys this thread grou
703 addThread(Thread thread) argument
715 removeThread(Thread thread) argument
[all...]
H A DThread.java45 * has at least one thread running when it is started, the main thread, in the main
46 * {@link ThreadGroup}. The runtime keeps its own threads in the system thread
49 * <p>There are two ways to execute code in a new thread.
55 * <p>Each {@code Thread} has an integer priority that affect how the thread is
56 * scheduled by the OS. A new thread inherits the priority of its parent.
57 * A thread's priority can be set using the {@link #setPriority(int)} method.
75 * A representation of a thread's state. A given thread may only be in one
80 * The thread ha
1125 uncaughtException(Thread thread, Throwable ex) 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/tests/api/org/apache/harmony/kernel/dalvik/
H A DThreadsTest.java80 /** Test the case where the thread is preemptively unparked. */
122 /** Test the case where the thread is preemptively unparked. */
257 * specified amount of time and then unparks an indicated thread.
262 private final Thread thread; field in class:ThreadsTest.WaitAndUnpark
264 public WaitAndUnpark(CyclicBarrier barrier, long waitMillis, Thread thread) { argument
267 this.thread = thread;
282 UNSAFE.unpark(thread);
/libcore/luni/src/main/java/java/lang/
H A DSecurityManager.java42 public void checkAccess(Thread thread) { } argument
141 * Returns the current thread's thread group.
/libcore/luni/src/main/java/java/util/concurrent/
H A DFutureTask.java76 /** The thread running the callable; CASed during run() */
326 volatile Thread thread; field in class:FutureTask.WaitNode
328 WaitNode() { thread = Thread.currentThread(); }
340 Thread t = q.thread;
342 q.thread = null;
381 q.thread = null;
416 node.thread = null;
421 if (q.thread != null)
425 if (pred.thread == null) // check for race
H A DTimeUnit.java303 * @param thread the thread to wait for
308 public void timedJoin(Thread thread, long timeout) argument
313 thread.join(ms, ns);
H A DPhaser.java65 * waiting thread is interrupted. Interruptible and timeout
482 * parent, and initial phase number 0. Any thread using this
719 * @throws InterruptedException if thread interrupted while waiting
754 * @throws InterruptedException if thread interrupted while waiting
947 Thread t; // its thread
952 (t = q.thread) != null) {
953 q.thread = null;
974 if (q == null || ((t = q.thread) != null && q.phase == p))
977 q.thread = null;
991 * avoid it when threads regularly arrive: When a thread i
1069 volatile Thread thread; // nulled to cancel wait field in class:Phaser.QNode
[all...]
H A DThreadPoolExecutor.java35 * Executors#newCachedThreadPool} (unbounded thread pool, with
36 * automatic thread reclamation), {@link Executors#newFixedThreadPool}
37 * (fixed size thread pool) and {@link
38 * Executors#newSingleThreadExecutor} (single background thread), that
54 * and fewer than corePoolSize threads are running, a new thread is
57 * maximumPoolSize threads running, a new thread will be created only
59 * the same, you create a fixed-size thread pool. By setting
82 * alter the thread's name, thread group, priority, daemon status,
83 * etc. If a {@code ThreadFactory} fails to create a thread whe
569 final Thread thread; field in class:ThreadPoolExecutor.Worker
[all...]
/libcore/luni/src/test/java/libcore/javax/net/ssl/
H A DSSLSocketTest.java549 @Override public void uncaughtException(Thread thread, Throwable ex) { argument
1122 // wait for thread to finish so we know client is closed.
1245 // Currently failing due to reader blocking closing thread http://b/10681815
1291 * thread will interupt another thread blocked reading on the same

Completed in 1020 milliseconds