Searched refs:tasks (Results 1 - 9 of 9) sorted by relevance

/libcore/luni/src/main/java/java/util/concurrent/
H A DAbstractExecutorService.java110 private <T> T doInvokeAny(Collection<? extends Callable<T>> tasks, argument
113 if (tasks == null)
115 int ntasks = tasks.size();
123 // parallelism, check to see if previously submitted tasks are
133 Iterator<? extends Callable<T>> it = tasks.iterator();
183 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) argument
186 return doInvokeAny(tasks, false, 0);
193 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, argument
196 return doInvokeAny(tasks, true, unit.toNanos(timeout));
199 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) argument
229 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
[all...]
H A DExecutorService.java18 * one or more asynchronous tasks.
21 * it to reject new tasks. Two different methods are provided for
23 * method will allow previously submitted tasks to execute before
25 * tasks from starting and attempts to stop currently executing tasks.
26 * Upon termination, an executor has no tasks actively executing, no
27 * tasks awaiting execution, and no new tasks can be submitted. An
36 * tasks and then waiting for at least one, or all, to
80 * first by calling <tt>shutdown</tt> to reject incoming tasks, an
246 invokeAll(Collection<? extends Callable<T>> tasks) argument
276 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
298 invokeAny(Collection<? extends Callable<T>> tasks) argument
323 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
[all...]
H A DExecutors.java48 * <tt>nThreads</tt> threads will be active processing tasks.
49 * If additional tasks are submitted when all threads are active,
53 * execute subsequent tasks. The threads in the pool will exist
71 * tasks. If additional tasks are submitted when all threads are
75 * needed to execute subsequent tasks. The threads in the pool will
97 * subsequent tasks.) Tasks are guaranteed to execute
138 * of programs that execute many short-lived asynchronous tasks.
178 * subsequent tasks.) Tasks are guaranteed to execute
195 * place if needed to execute subsequent tasks
570 invokeAll(Collection<? extends Callable<T>> tasks) argument
574 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
579 invokeAny(Collection<? extends Callable<T>> tasks) argument
583 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
[all...]
H A DForkJoinTask.java28 * Abstract base class for tasks that run within a {@link ForkJoinPool}.
30 * lighter weight than a normal thread. Huge numbers of tasks and
47 * reflecting their intended use as computational tasks calculating
53 * other blocking synchronization apart from joining other tasks or
58 * tasks. Minor breaches of these restrictions, for example using
83 * may be useful when a set of tasks are being executed, and you need
87 * of tasks and joining them all.
89 * <p>The execution status of tasks may be queried at several levels
121 * tasks cyclically wait for each other. However, this framework
138 * computation. Large tasks shoul
681 invokeAll(ForkJoinTask<?>.... tasks) argument
731 invokeAll(Collection<T> tasks) argument
[all...]
H A DForkJoinPool.java41 * execute subtasks created by other active tasks (eventually blocking
43 * when most tasks spawn other subtasks (as do most {@code
46 * with event-style tasks that are never joined.
52 * internal worker threads, even if some tasks are stalled waiting to
72 * tasks that are already executing in a pool should normally
121 * <p>This implementation rejects submitted tasks (that is, by throwing
136 * into a submission queue. Workers take these tasks and typically
138 * Preference rules give first priority to processing tasks from
140 * randomized FIFO steals of tasks in other worker queues, and
144 * decentralized control -- workers mostly take tasks fro
1596 invokeAll(Collection<? extends Callable<T>> tasks) argument
1609 final ArrayList<ForkJoinTask<T>> tasks; field in class:ForkJoinPool.InvokeAll
1610 InvokeAll(ArrayList<ForkJoinTask<T>> tasks) argument
[all...]
H A DThreadPoolExecutor.java23 * asynchronous tasks, due to reduced per-task invocation overhead,
25 * including threads, consumed when executing a collection of tasks.
27 * statistics, such as the number of completed tasks.
60 * tasks. Most typically, core and maximum pool sizes are set only
67 * started only when new tasks arrive, but this can be overridden
82 * continue, but might not be able to execute any tasks.</dd>
104 * submitted tasks. The use of this queue interacts with pool sizing:
126 * queue is a {@link SynchronousQueue} that hands off tasks to threads
132 * avoid rejection of new submitted tasks. This in turn admits the
138 * capacity) will cause new tasks t
[all...]
/libcore/luni/src/main/java/java/util/
H A DTimer.java21 * Timers schedule one-shot or recurring {@link TimerTask tasks} for execution.
25 * <p>Each timer has one thread on which tasks are executed sequentially. When
26 * this thread is busy running a task, runnable tasks may be subject to delays.
31 * <p>Recurring tasks are scheduled with either a fixed period or a fixed rate:
41 * from starting tasks on time.
181 private TimerHeap tasks = new TimerHeap(); field in class:Timer.TimerImpl
208 if (tasks.isEmpty()) {
212 // no tasks scheduled -- sleep until any task appear
222 task = tasks.minimum();
227 tasks
[all...]
/libcore/dalvik/src/main/java/dalvik/system/
H A DZygote.java71 File tasks = new File("/proc/self/task");
72 while (tasks.list().length > 1) {
/libcore/luni/src/test/java/tests/api/java/util/
H A DTimerTest.java322 TimerTestTask[] tasks = new TimerTestTask[100];
327 tasks[i] = new TimerTestTask();
328 t.schedule(tasks[i], delayTime[j++], 200);
335 tasks[i].cancel();
457 // Ensure multiple tasks are run
480 "Multiple tasks should have incremented counter 4 times not "
579 // Ensure multiple tasks are run
598 "Multiple tasks should have incremented counter 4 times not "
728 // Ensure multiple tasks are run
747 "Multiple tasks shoul
[all...]

Completed in 122 milliseconds