/libcore/luni/src/main/java/java/util/concurrent/ |
H A D | CompletionService.java | 27 * submitting a task to a {@code CompletionService} 29 * actions taken by that task, which in turn <i>happen-before</i> 35 * Submits a value-returning task for execution and returns a Future 36 * representing the pending results of the task. Upon completion, 37 * this task may be taken or polled. 39 * @param task the task to submit 40 * @return a Future representing pending completion of the task 41 * @throws RejectedExecutionException if the task cannot be 43 * @throws NullPointerException if the task i 45 submit(Callable<V> task) argument 61 submit(Runnable task, V result) argument [all...] |
H A D | AbstractExecutorService.java | 48 * @param runnable the runnable task being wrapped 53 * the underlying task. 61 * Returns a <tt>RunnableFuture</tt> for the given callable task. 63 * @param callable the callable task being wrapped 67 * cancellation of the underlying task. 78 public Future<?> submit(Runnable task) { argument 79 if (task == null) throw new NullPointerException(); 80 RunnableFuture<Void> ftask = newTaskFor(task, null); 89 public <T> Future<T> submit(Runnable task, T result) { argument 90 if (task 100 submit(Callable<T> task) argument [all...] |
H A D | ExecutorCompletionService.java | 87 QueueingFuture(RunnableFuture<V> task) { argument 88 super(task, null); 89 this.task = task; 91 protected void done() { completionQueue.add(task); } 92 private final Future<V> task; field in class:ExecutorCompletionService.QueueingFuture 95 private RunnableFuture<V> newTaskFor(Callable<V> task) { argument 97 return new FutureTask<V>(task); 99 return aes.newTaskFor(task); 102 private RunnableFuture<V> newTaskFor(Runnable task, argument 149 submit(Callable<V> task) argument 156 submit(Runnable task, V result) argument [all...] |
H A D | ExecutorService.java | 103 * submission of a {@code Runnable} or {@code Callable} task to an 106 * any actions taken by that task, which in turn <i>happen-before</i> the 137 * task that fails to respond to interrupts may never terminate. 175 * Submits a value-returning task for execution and returns a 176 * Future representing the pending results of the task. The 177 * Future's <tt>get</tt> method will return the task's result upon 182 * for a task, you can use constructions of the form 190 * @param task the task to submit 191 * @return a Future representing pending completion of the task 196 submit(Callable<T> task) argument 210 submit(Runnable task, T result) argument 223 submit(Runnable task) argument [all...] |
H A D | Executors.java | 98 * sequentially, and no more than one task will be active at any 179 * sequentially, and no more than one task will be active at any 196 * guaranteed to execute sequentially, and no more than one task 298 * called, runs the given task and returns the given result. This 301 * @param task the task to run 304 * @throws NullPointerException if task null 306 public static <T> Callable<T> callable(Runnable task, T result) { argument 307 if (task == null) 309 return new RunnableAdapter<T>(task, resul 319 callable(Runnable task) argument 383 final Runnable task; field in class:Executors.RunnableAdapter 385 RunnableAdapter(Runnable task, T result) argument 399 private final Callable<T> task; field in class:Executors.PrivilegedCallable 402 PrivilegedCallable(Callable<T> task) argument 426 private final Callable<T> task; field in class:Executors.PrivilegedCallableUsingCurrentClassLoader 430 PrivilegedCallableUsingCurrentClassLoader(Callable<T> task) argument 561 submit(Runnable task) argument 564 submit(Callable<T> task) argument 567 submit(Runnable task, T result) argument [all...] |
H A D | ForkJoinTask.java | 51 * until the task's result has been computed. Computations should 69 * internal task queues. Rethrown exceptions behave in the same way as 76 * results of a task is {@link #join}, but there are several variants: 90 * of detail: {@link #isDone} is true if a task completed in any way 91 * (including the case where a task was cancelled without executing); 92 * {@link #isCompletedNormally} is true if a task completed without 94 * true if the task was cancelled (in which case {@link #getException} 96 * {@link #isCompletedAbnormally} is true if a task was either 110 * instances of different task subclasses to call each other's 129 * underlying lightweight task schedulin 394 ExceptionNode(ForkJoinTask<?> task, Throwable ex, ExceptionNode next) argument [all...] |
H A D | ScheduledThreadPoolExecutor.java | 33 * <p>When a submitted task is cancelled before it is run, execution 34 * is suppressed. Such a cancelled task is not 39 * <p>Successive executions of a task scheduled via 60 * control per-task delays and scheduling. To preserve 63 * disables additional task customization. However, this class 66 * {@code Callable}) that can be used to customize the concrete task 70 * {@code ScheduledThreadPoolExecutor} uses a task type extending 80 * Runnable r, RunnableScheduledFuture<V> task) { 81 * return new CustomTask<V>(r, task); 85 * Callable<V> c, RunnableScheduledFuture<V> task) { 298 delayedExecute(RunnableScheduledFuture<?> task) argument 318 reExecutePeriodic(RunnableScheduledFuture<?> task) argument 372 decorateTask( Runnable runnable, RunnableScheduledFuture<V> task) argument 388 decorateTask( Callable<V> callable, RunnableScheduledFuture<V> task) argument 603 submit(Runnable task) argument 611 submit(Runnable task, T result) argument 619 submit(Callable<T> task) argument [all...] |
H A D | ForkJoinPool.java | 66 * main task execution methods summarized in the following 100 * used for all parallel task execution in a program or subsystem. 180 * is on-demand, triggered by task submissions, replacement of 212 * mainly that a task-producing thread can miss seeing (and 226 * appears to be at least one task they might be able to find and 228 * task to a queue that previously had two or fewer tasks, they 232 * as well as those performed when a worker steals a task and 252 * actions when one worker is waiting to join a task stolen (or 259 * unblocked task and its continuation to progress. Instead we 262 * Helping: Arranging for the joiner to execute some task tha 1470 invoke(ForkJoinTask<T> task) argument 1489 forkOrSubmit(ForkJoinTask<T> task) argument 1509 execute(ForkJoinTask<?> task) argument 1522 execute(Runnable task) argument 1542 submit(ForkJoinTask<T> task) argument 1554 submit(Callable<T> task) argument 1567 submit(Runnable task, T result) argument 1580 submit(Runnable task) argument [all...] |
H A D | ThreadPoolExecutor.java | 17 * An {@link ExecutorService} that executes each submitted task using 23 * asynchronous tasks, due to reduced per-task invocation overhead, 51 * When a new task is submitted in method {@link #execute}, and fewer 117 * this would exceed maximumPoolSize, in which case, the task will be 127 * without otherwise holding them. Here, an attempt to queue a task 142 * each task is completely independent of others, so tasks cannot 184 * that invokes {@code execute} itself runs the task. This provides a 188 * <li> In {@link ThreadPoolExecutor.DiscardPolicy}, a task that 192 * executor is not shut down, the task at the head of the work queue 207 * before and after execution of each task 1683 remove(Runnable task) argument [all...] |
/libcore/luni/src/test/java/tests/support/ |
H A D | ThreadPool.java | 44 public synchronized void runTask(Runnable task) { argument 48 if (task != null) { 49 taskQueue.add(task); 99 Runnable task = null; 101 task = getTask(); 106 if (task == null) { 112 task.run();
|
/libcore/luni/src/main/java/java/util/ |
H A D | Timer.java | 26 * this thread is busy running a task, runnable tasks may be subject to delays. 34 * successive run of a task is scheduled relative to the start time of 38 * successive run of a task is scheduled without regard for when the 48 * <p>This class does not offer guarantees about the real-time nature of task 73 public void insert(TimerTask task) { argument 79 timers[size++] = task; 155 private int getTask(TimerTask task) { argument 157 if (timers[i] == task) { 202 TimerTask task; 212 // no tasks scheduled -- sleep until any task appea 434 schedule(TimerTask task, Date when) argument 455 schedule(TimerTask task, long delay) argument 477 schedule(TimerTask task, long delay, long period) argument 500 schedule(TimerTask task, Date when, long period) argument 524 scheduleAtFixedRate(TimerTask task, long delay, long period) argument 547 scheduleAtFixedRate(TimerTask task, Date when, long period) argument 558 scheduleImpl(TimerTask task, long delay, long period, boolean fixed) argument [all...] |