/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ThreadPoolExecutorTest.java | 25 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in ExtendedTPE() 27 protected void beforeExecute(Thread t, Runnable r) { in beforeExecute() 30 protected void afterExecute(Runnable r, Throwable t) { in afterExecute() 50 public Thread newThread(Runnable r) { in newThread() 63 new ArrayBlockingQueue<Runnable>(10)); in testExecute() 65 final Runnable task = new CheckedRunnable() { in testExecute() 85 new ArrayBlockingQueue<Runnable>(10)); in testGetActiveCount() 111 new ArrayBlockingQueue<Runnable>(10)); in testPrestartCoreThread() 129 new ArrayBlockingQueue<Runnable>(10)); in testPrestartAllCoreThreads() 146 new ArrayBlockingQueue<Runnable>(10)); in testGetCompletedTaskCount() [all …]
|
D | ThreadPoolExecutorSubclassTest.java | 33 CustomTask(final Runnable r, final V res) { in CustomTask() 118 protected <V> RunnableFuture<V> newTaskFor(Runnable r, V v) { in newTaskFor() 126 BlockingQueue<Runnable> workQueue) { in CustomTPE() 134 BlockingQueue<Runnable> workQueue, in CustomTPE() 144 BlockingQueue<Runnable> workQueue, in CustomTPE() 153 BlockingQueue<Runnable> workQueue, in CustomTPE() 165 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in CustomTPE() 167 protected void beforeExecute(Thread t, Runnable r) { in beforeExecute() 170 protected void afterExecute(Runnable r, Throwable t) { in afterExecute() 190 public Thread newThread(Runnable r) { in newThread() [all …]
|
D | ExecutorsTest.java | 177 final Runnable task = new CheckedRunnable() { in testNewSingleThreadScheduledExecutor() 203 final Runnable task = new CheckedRunnable() { in testNewScheduledThreadPool() 231 final Runnable task = new CheckedRunnable() { in testUnconfigurableScheduledExecutorService() 261 final Runnable sleeper = new CheckedInterruptedRunnable() { in testTimedCallable() 288 Runnable r = new CheckedRunnable() { in testDefaultThreadFactory() 327 Runnable r = new CheckedRunnable() { in testPrivilegedThreadFactory() 332 Runnable r = new CheckedRunnable() { in testPrivilegedThreadFactory() 395 Runnable r = new CheckedRunnable() { in testCreatePrivilegedCallableUsingCCLWithNoPrivs() 413 Runnable r = new CheckedRunnable() { in testPrivilegedCallableUsingCCLWithPrivs() 432 Runnable r = new CheckedRunnable() { in testPrivilegedCallableWithNoPrivs() [all …]
|
D | JSR166TestCase.java | 508 public void runWithPermissions(Runnable r, Permission... permissions) { in runWithPermissions() 517 public void runWithSecurityManagerWithPermissions(Runnable r, in runWithSecurityManagerWithPermissions() 525 public void runWithoutPermissions(Runnable r) { in runWithoutPermissions() 635 Thread newStartedThread(Runnable runnable) { in newStartedThread() 671 public abstract class CheckedRunnable implements Runnable { 683 public abstract class RunnableShouldThrow implements Runnable { 723 public abstract class CheckedInterruptedRunnable implements Runnable { 769 public static class NoOpRunnable implements Runnable { 793 public Runnable awaiter(final CountDownLatch latch) { 888 public Runnable possiblyInterruptedRunnable(final long timeoutMillis) { [all …]
|
D | ExecutorCompletionServiceTest.java | 73 Runnable r = null; in testSubmitNPE2() 169 new ArrayBlockingQueue<Runnable>(1)) { in testNewTaskForCallable() 196 MyRunnableFuture(Runnable t, V r) { super(t, r); } in testNewTaskForRunnable() 201 new ArrayBlockingQueue<Runnable>(1)) { in testNewTaskForRunnable() 202 protected <T> RunnableFuture<T> newTaskFor(Runnable t, T r) { in testNewTaskForRunnable() 209 Runnable r = new NoOpRunnable(); in testNewTaskForRunnable()
|
D | ScheduledExecutorTest.java | 25 final Runnable task = new CheckedRunnable() { in testExecute() 68 Runnable task = new CheckedRunnable() { in testSchedule3() 90 Runnable task = new CheckedRunnable() { in testSchedule4() 114 Runnable task = new CheckedRunnable() { in testSchedule5() 130 static class RunnableCounter implements Runnable { 530 Runnable r = new CheckedRunnable() { in testGetQueue() 538 BlockingQueue<Runnable> q = p.getQueue(); in testGetQueue() 557 Runnable r = new CheckedRunnable() { in testRemove() 565 BlockingQueue<Runnable> q = p.getQueue(); in testRemove() 566 assertFalse(p.remove((Runnable)tasks[0])); in testRemove() [all …]
|
D | ScheduledExecutorSubclassTest.java | 49 …protected <V> RunnableScheduledFuture<V> decorateTask(Runnable r, RunnableScheduledFuture<V> task)… in decorateTask() 77 final Runnable task = new CheckedRunnable() { in testExecute() 120 Runnable task = new CheckedRunnable() { in testSchedule3() 142 Runnable task = new CheckedRunnable() { in testSchedule4() 166 Runnable task = new CheckedRunnable() { in testSchedule5() 182 static class RunnableCounter implements Runnable { 579 Runnable r = new CheckedRunnable() { in testGetQueue() 587 BlockingQueue<Runnable> q = p.getQueue(); in testGetQueue() 606 Runnable r = new CheckedRunnable() { in testRemove() 614 BlockingQueue<Runnable> q = p.getQueue(); in testRemove() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | Executors.java | 63 new LinkedBlockingQueue<Runnable>()); in newFixedThreadPool() 126 new LinkedBlockingQueue<Runnable>(), in newFixedThreadPool() 147 new LinkedBlockingQueue<Runnable>())); in newSingleThreadExecutor() 168 new LinkedBlockingQueue<Runnable>(), in newSingleThreadExecutor() 191 new SynchronousQueue<Runnable>()); in newCachedThreadPool() 206 new SynchronousQueue<Runnable>(), in newCachedThreadPool() 343 public static <T> Callable<T> callable(Runnable task, T result) { in callable() 356 public static Callable<Object> callable(Runnable task) { in callable() 415 final Runnable task; 417 RunnableAdapter(Runnable task, T result) { [all …]
|
D | ThreadPoolExecutor.java | 414 private final BlockingQueue<Runnable> workQueue; 560 implements Runnable 571 Runnable firstTask; 579 Worker(Runnable firstTask) { in Worker() 792 final void reject(Runnable command) { in reject() 821 private List<Runnable> drainQueue() { in drainQueue() 822 BlockingQueue<Runnable> q = workQueue; in drainQueue() 823 ArrayList<Runnable> taskList = new ArrayList<Runnable>(); in drainQueue() 826 for (Runnable r : q.toArray(new Runnable[0])) { in drainQueue() 864 private boolean addWorker(Runnable firstTask, boolean core) { in addWorker() [all …]
|
D | ScheduledExecutorService.java | 81 public ScheduledFuture<?> schedule(Runnable command, in schedule() 124 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, in scheduleAtFixedRate() 151 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, in scheduleWithFixedDelay()
|
D | ScheduledThreadPoolExecutor.java | 180 ScheduledFutureTask(Runnable r, V result, long ns) { in ScheduledFutureTask() 190 ScheduledFutureTask(Runnable r, V result, long ns, long period) { in ScheduledFutureTask() 331 BlockingQueue<Runnable> q = super.getQueue(); in onShutdown() 371 Runnable runnable, RunnableScheduledFuture<V> task) { in decorateTask() 495 public ScheduledFuture<?> schedule(Runnable command, in schedule() 528 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, in scheduleAtFixedRate() 552 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, in scheduleWithFixedDelay() 591 public void execute(Runnable command) { in execute() 601 public Future<?> submit(Runnable task) { in submit() 609 public <T> Future<T> submit(Runnable task, T result) { in submit() [all …]
|
D | ExecutorService.java | 141 List<Runnable> shutdownNow(); in shutdownNow() 209 <T> Future<T> submit(Runnable task, T result); in submit() 222 Future<?> submit(Runnable task); in submit()
|
D | CyclicBarrier.java | 129 private final Runnable barrierCommand; 185 final Runnable command = barrierCommand; in dowait() 244 public CyclicBarrier(int parties, Runnable barrierAction) { in CyclicBarrier()
|
D | Executor.java | 111 void execute(Runnable command); in execute()
|
D | ThreadFactory.java | 39 Thread newThread(Runnable r); in newThread()
|
D | RunnableFuture.java | 19 public interface RunnableFuture<V> extends Runnable, Future<V> {
|
/libcore/luni/src/test/java/tests/support/ |
D | ThreadPool.java | 26 private LinkedList<Runnable> taskQueue; 38 taskQueue = new LinkedList<Runnable>(); in ThreadPool() 44 public synchronized void runTask(Runnable task) { in runTask() 54 protected synchronized Runnable getTask() throws InterruptedException { in getTask() 62 return (Runnable) taskQueue.removeFirst(); in getTask() 99 Runnable task = null; in run()
|
/libcore/luni/src/test/java/tests/java/sql/ |
D | MultiThreadAccessTest.java | 238 private static Runnable createTask1(final int taskID) { in createTask1() 239 return new Runnable() { in createTask1() 270 private static Runnable createTask2(final int taskID) { 271 return new Runnable() { 321 private static Runnable createTask3(final int taskID) { 322 return new Runnable() { 349 private static Runnable createTask4(final int id) { 350 return new Runnable() { 369 private static Runnable createTask5(final int id) { 370 return new Runnable() { [all …]
|
/libcore/libart/src/main/java/java/lang/ |
D | Thread.java | 59 public class Thread implements Runnable { 134 Runnable target; 154 private final List<Runnable> interruptActions = new ArrayList<Runnable>(); 214 public Thread(Runnable runnable) { in Thread() 232 public Thread(Runnable runnable, String threadName) { in Thread() 276 public Thread(ThreadGroup group, Runnable runnable) { in Thread() 296 public Thread(ThreadGroup group, Runnable runnable, String threadName) { in Thread() 346 public Thread(ThreadGroup group, Runnable runnable, String threadName, long stackSize) { in Thread() 402 private void create(ThreadGroup group, Runnable runnable, String threadName, long stackSize) { in create() 875 public final void pushInterruptAction$(Runnable interruptAction) { in pushInterruptAction$() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | ResourceLeakageDetector.java | 59 private Runnable postTestChecker; 75 postTestChecker = (Runnable) CLOSE_GUARD_MONITOR_CLASS.newInstance(); in ResourceLeakageDetector()
|
D | AbstractCollectionTest.java | 31 Thread reader = new Thread(new Runnable() { in test_toArray() 40 Thread mutator = new Thread(new Runnable() { in test_toArray()
|
/libcore/luni/src/main/java/java/nio/channels/spi/ |
D | AbstractInterruptibleChannel.java | 42 private final Runnable interruptAndCloseRunnable = new Runnable() {
|
D | AbstractSelector.java | 40 private final Runnable wakeupRunnable = new Runnable() {
|
/libcore/luni/src/test/java/libcore/java/lang/ref/ |
D | ReferenceQueueTest.java | 45 runLater(new Runnable() { in testRemoveWithSpuriousNotify() 92 private void runLater(Runnable runnable, int delayMillis) { in runLater() 99 runLater(new Runnable() { in enqueueLater()
|
/libcore/luni/src/main/java/java/lang/ |
D | Runnable.java | 25 public interface Runnable { interface
|