Searched refs:queue (Results 1 - 13 of 13) sorted by relevance

/libcore/luni/src/main/java/java/lang/ref/
H A DReference.java53 * If non-null, the queue on which this reference will be enqueued
55 * VM requirement: this field <em>must</em> be called "queue"
58 volatile ReferenceQueue<? super T> queue; field in class:Reference
72 * queue thread.
86 queue = q;
98 * Adds an object to its reference queue.
106 if (queue != null && queueNext == null) {
107 queue.enqueue(this);
108 queue = null;
116 * a queue
[all...]
H A DFinalizerReference.java23 // This queue contains those objects eligible for finalization.
24 public static final ReferenceQueue<Object> queue = new ReferenceQueue<Object>(); field in class:FinalizerReference
26 // Guards the list (not the queue).
54 FinalizerReference<?> reference = new FinalizerReference<Object>(referent, queue);
95 // and then put it on the queue so that it can be finalized.
/libcore/luni/src/test/java/tests/api/java/util/
H A DAbstractQueueTest.java31 private MockAbstractQueue<Object> queue; field in class:AbstractQueueTest
113 queue.add(null);
127 queue.add(o);
131 queue.add(o);
145 queue.add(o);
148 queue.add(I);
149 assertTrue(queue.contains(I));
150 Iterator iter = queue.iterator();
162 queue.addAll(null);
175 queue
[all...]
/libcore/luni/src/test/java/libcore/java/util/
H A DOldPriorityQueueTest.java28 PriorityQueue<Object> queue = new PriorityQueue<Object>(100);
29 assertNotNull(queue);
30 assertEquals(0, queue.size());
31 assertNull(queue.comparator());
42 PriorityQueue<String> queue = new PriorityQueue<String>(10,
46 queue.offer(array[i]);
48 assertFalse(queue.contains("BB"));
51 assertFalse(queue.remove("BB"));
52 assertTrue(queue.remove("AA"));
/libcore/luni/src/main/java/java/util/concurrent/
H A DScheduledThreadPoolExecutor.java35 * automatically removed from the work queue until its delay
50 * {@code corePoolSize} threads and an unbounded queue, adjustments
107 * 2. Using a custom queue (DelayedWorkQueue), a variant of
136 * True if ScheduledFutureTask.cancel should remove from queue
174 * Index into delay queue, to support faster cancellation.
289 * is shut down, rejects the task. Otherwise adds task to queue
329 * Cancels and clears the queue of all tasks that should not be run
430 * because the thread bounds and queue capacities are reached
449 * because the thread bounds and queue capacities are reached
477 * Constrains the values of all delays in the queue t
807 private RunnableScheduledFuture<?>[] queue = field in class:ScheduledThreadPoolExecutor.DelayedWorkQueue
[all...]
H A DPriorityBlockingQueue.java17 * An unbounded {@linkplain BlockingQueue blocking queue} that uses
19 * blocking retrieval operations. While this queue is logically
22 * {@code null} elements. A priority queue relying on {@linkplain
102 * Priority queue represented as a balanced binary heap: the two
103 * children of queue[n] are queue[2*n+1] and queue[2*(n+1)]. The
104 * priority queue is ordered by comparator, or by the elements'
107 * lowest value is in queue[0], assuming the queue i
109 private transient Object[] queue; field in class:PriorityBlockingQueue
[all...]
H A DForkJoinWorkerThread.java48 * queue design is roughly similar to those in the papers "Dynamic
63 * circular array-based queue (see for example ArrayDeque).
65 * guarantees that queueTop == queueBase means the queue is empty,
66 * but otherwise may err on the side of possibly making the queue
76 * any empty queue to complete.
125 * queueBase reads, reads of the queue array and its slots by
138 * placement and sizing of the (resizable) queue array. Even
152 * Capacity of work-stealing queue array upon initialization.
159 * Maximum size for queue array. Must be a power of two
167 * The work-stealing queue arra
171 ForkJoinTask<?>[] queue; field in class:ForkJoinWorkerThread
[all...]
H A DForkJoinPool.java136 * into a submission queue. Workers take these tasks and typically
188 * the wait queue field of ctl stores worker indices, not worker
195 * All uses of the workers array, as well as queue arrays, check
207 * wait queue when they cannot find work. This "queue" is actually
214 * has not yet entered the wait queue. We solve this by requiring
217 * queue. During a rescan, the worker might release some other
228 * task to a queue that previously had two or fewer tasks, they
244 * array-based queue that is structured identically to
419 * Initial size for submission queue arra
[all...]
/libcore/luni/src/main/java/java/util/
H A DServiceLoader.java192 private LinkedList<String> queue = new LinkedList<String>(); field in class:ServiceLoader.ServiceIterator
204 return (queue != null && !queue.isEmpty());
212 String className = queue.remove();
239 if (!queue.contains(className)) {
240 queue.add(className);
H A DWeakHashMap.java70 Entry(K key, V object, ReferenceQueue<K> queue) { argument
71 super(key, queue);
/libcore/luni/src/test/java/libcore/java/lang/ref/
H A DReferenceQueueTest.java98 private void enqueueLater(final ReferenceQueue<Object> queue, int delayMillis) { argument
101 enqueue(queue);
106 private void enqueue(ReferenceQueue<Object> queue) { argument
107 new WeakReference<Object>(new Object(), queue).enqueue();
/libcore/luni/src/test/java/tests/api/java/lang/ref/
H A DReferenceTest.java147 ReferenceQueue<Object> queue = new ReferenceQueue<Object>();
149 r = newWeakReference(queue);
151 Reference ref = queue.remove();
156 r = newWeakReference(queue);
159 // wait for the reference queue thread to enqueue the newly-finalized object
163 ref = queue.poll();
253 private WeakReference<Object> newWeakReference(ReferenceQueue<Object> queue) { argument
255 WeakReference<Object> ref = new WeakReference<Object>(o, queue);
/libcore/luni/src/main/java/java/lang/
H A DDaemons.java27 * Calls Object.finalize() on objects in the finalizer reference queue. The VM
119 * pending list to the managed reference queue.
162 private final ReferenceQueue<Object> queue = FinalizerReference.queue; field in class:Daemons.FinalizerDaemon
170 doFinalize((FinalizerReference<?>) queue.remove());

Completed in 257 milliseconds