Home
last modified time | relevance | path

Searched refs:Runnable (Results 1 – 25 of 102) sorted by relevance

12345

/libcore/jsr166-tests/src/test/java/jsr166/
DThreadPoolExecutorTest.java53 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in ExtendedTPE()
55 protected void beforeExecute(Thread t, Runnable r) { in beforeExecute()
58 protected void afterExecute(Runnable r, Throwable t) { in afterExecute()
78 public Thread newThread(Runnable r) { in newThread()
91 new ArrayBlockingQueue<Runnable>(10)); in testExecute()
93 final Runnable task = new CheckedRunnable() { in testExecute()
113 new ArrayBlockingQueue<Runnable>(10)); in testGetActiveCount()
139 new ArrayBlockingQueue<Runnable>(10)); in testPrestartCoreThread()
157 new ArrayBlockingQueue<Runnable>(10)); in testPrestartAllCoreThreads()
174 new ArrayBlockingQueue<Runnable>(10)); in testGetCompletedTaskCount()
[all …]
DThreadPoolExecutorSubclassTest.java63 CustomTask(final Runnable r, final V res) { in CustomTask()
148 protected <V> RunnableFuture<V> newTaskFor(Runnable r, V v) { in newTaskFor()
156 BlockingQueue<Runnable> workQueue) { in CustomTPE()
164 BlockingQueue<Runnable> workQueue, in CustomTPE()
174 BlockingQueue<Runnable> workQueue, in CustomTPE()
183 BlockingQueue<Runnable> workQueue, in CustomTPE()
195 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in CustomTPE()
197 protected void beforeExecute(Thread t, Runnable r) { in beforeExecute()
200 protected void afterExecute(Runnable r, Throwable t) { in afterExecute()
220 public Thread newThread(Runnable r) { in newThread()
[all …]
DExecutorsTest.java200 final Runnable task = new CheckedRunnable() { in testNewSingleThreadScheduledExecutor()
226 final Runnable task = new CheckedRunnable() { in testNewScheduledThreadPool()
254 final Runnable task = new CheckedRunnable() { in testUnconfigurableScheduledExecutorService()
284 final Runnable sleeper = new CheckedInterruptedRunnable() { in testTimedCallable()
310 Runnable r = new CheckedRunnable() { in testDefaultThreadFactory()
349 Runnable r = new CheckedRunnable() { in testPrivilegedThreadFactory()
355 Runnable r = new CheckedRunnable() { in testPrivilegedThreadFactory()
418 Runnable r = new CheckedRunnable() { in testCreatePrivilegedCallableUsingCCLWithNoPrivs()
436 Runnable r = new CheckedRunnable() { in testPrivilegedCallableUsingCCLWithPrivs()
455 Runnable r = new CheckedRunnable() { in testPrivilegedCallableWithNoPrivs()
[all …]
DJSR166TestCase.java534 public void runWithPermissions(Runnable r, Permission... permissions) { in runWithPermissions()
545 public void runWithSecurityManagerWithPermissions(Runnable r, in runWithSecurityManagerWithPermissions()
553 public void runWithoutPermissions(Runnable r) { in runWithoutPermissions()
693 Thread newStartedThread(Runnable runnable) { in newStartedThread()
729 public abstract class CheckedRunnable implements Runnable {
741 public abstract class RunnableShouldThrow implements Runnable {
781 public abstract class CheckedInterruptedRunnable implements Runnable {
827 public static class NoOpRunnable implements Runnable {
851 public Runnable awaiter(final CountDownLatch latch) {
946 public Runnable possiblyInterruptedRunnable(final long timeoutMillis) {
[all …]
DExecutorCompletionServiceTest.java83 Runnable r = null; in testSubmitNPE2()
179 new ArrayBlockingQueue<Runnable>(1)) { in testNewTaskForCallable()
206 MyRunnableFuture(Runnable t, V r) { super(t, r); } in testNewTaskForRunnable()
211 new ArrayBlockingQueue<Runnable>(1)) { in testNewTaskForRunnable()
212 protected <T> RunnableFuture<T> newTaskFor(Runnable t, T r) { in testNewTaskForRunnable()
219 Runnable r = new NoOpRunnable(); in testNewTaskForRunnable()
DScheduledExecutorTest.java49 final Runnable task = new CheckedRunnable() { in testExecute()
92 Runnable task = new CheckedRunnable() { in testSchedule3()
114 Runnable task = new CheckedRunnable() { in testSchedule4()
138 Runnable task = new CheckedRunnable() { in testSchedule5()
154 static class RunnableCounter implements Runnable {
169 Runnable task = new CheckedRunnable() { in testFixedRateSequence()
197 Runnable task = new CheckedRunnable() { in testFixedDelaySequence()
576 Runnable r = new CheckedRunnable() { in testGetQueue()
584 BlockingQueue<Runnable> q = p.getQueue(); in testGetQueue()
603 Runnable r = new CheckedRunnable() { in testRemove()
[all …]
DScheduledExecutorSubclassTest.java78 …protected <V> RunnableScheduledFuture<V> decorateTask(Runnable r, RunnableScheduledFuture<V> task)… in decorateTask()
106 final Runnable task = new CheckedRunnable() { in testExecute()
149 Runnable task = new CheckedRunnable() { in testSchedule3()
171 Runnable task = new CheckedRunnable() { in testSchedule4()
195 Runnable task = new CheckedRunnable() { in testSchedule5()
211 static class RunnableCounter implements Runnable {
226 Runnable task = new CheckedRunnable() { in testFixedRateSequence()
254 Runnable task = new CheckedRunnable() { in testFixedDelaySequence()
630 Runnable r = new CheckedRunnable() { in testGetQueue()
638 BlockingQueue<Runnable> q = p.getQueue(); in testGetQueue()
[all …]
/libcore/luni/src/main/java/java/util/concurrent/
DExecutors.java64 new LinkedBlockingQueue<Runnable>()); in newFixedThreadPool()
127 new LinkedBlockingQueue<Runnable>(), in newFixedThreadPool()
148 new LinkedBlockingQueue<Runnable>())); in newSingleThreadExecutor()
169 new LinkedBlockingQueue<Runnable>(), in newSingleThreadExecutor()
192 new SynchronousQueue<Runnable>()); in newCachedThreadPool()
207 new SynchronousQueue<Runnable>(), in newCachedThreadPool()
344 public static <T> Callable<T> callable(Runnable task, T result) { in callable()
357 public static Callable<Object> callable(Runnable task) { in callable()
416 final Runnable task;
418 RunnableAdapter(Runnable task, T result) {
[all …]
DThreadPoolExecutor.java415 private final BlockingQueue<Runnable> workQueue;
561 implements Runnable
572 Runnable firstTask;
580 Worker(Runnable firstTask) { in Worker()
793 final void reject(Runnable command) { in reject()
822 private List<Runnable> drainQueue() { in drainQueue()
823 BlockingQueue<Runnable> q = workQueue; in drainQueue()
824 ArrayList<Runnable> taskList = new ArrayList<Runnable>(); in drainQueue()
827 for (Runnable r : q.toArray(new Runnable[0])) { in drainQueue()
865 private boolean addWorker(Runnable firstTask, boolean core) { in addWorker()
[all …]
DScheduledExecutorService.java81 public ScheduledFuture<?> schedule(Runnable command, in schedule()
124 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, in scheduleAtFixedRate()
151 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, in scheduleWithFixedDelay()
DScheduledThreadPoolExecutor.java182 ScheduledFutureTask(Runnable r, V result, long triggerTime) { in ScheduledFutureTask()
193 ScheduledFutureTask(Runnable r, V result, long triggerTime, in ScheduledFutureTask()
335 BlockingQueue<Runnable> q = super.getQueue(); in onShutdown()
375 Runnable runnable, RunnableScheduledFuture<V> task) { in decorateTask()
519 public ScheduledFuture<?> schedule(Runnable command, in schedule()
552 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, in scheduleAtFixedRate()
576 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, in scheduleWithFixedDelay()
615 public void execute(Runnable command) { in execute()
625 public Future<?> submit(Runnable task) { in submit()
633 public <T> Future<T> submit(Runnable task, T result) { in submit()
[all …]
DExecutorService.java142 List<Runnable> shutdownNow(); in shutdownNow()
210 <T> Future<T> submit(Runnable task, T result); in submit()
223 Future<?> submit(Runnable task); in submit()
DCyclicBarrier.java130 private final Runnable barrierCommand;
186 final Runnable command = barrierCommand; in dowait()
245 public CyclicBarrier(int parties, Runnable barrierAction) { in CyclicBarrier()
DExecutor.java111 void execute(Runnable command); in execute()
DThreadFactory.java39 Thread newThread(Runnable r); in newThread()
DRunnableFuture.java19 public interface RunnableFuture<V> extends Runnable, Future<V> {
/libcore/luni/src/test/java/tests/support/
DThreadPool.java26 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/
DMultiThreadAccessTest.java238 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/
DThread.java59 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/
DResourceLeakageDetector.java59 private Runnable postTestChecker;
75 postTestChecker = (Runnable) CLOSE_GUARD_MONITOR_CLASS.newInstance(); in ResourceLeakageDetector()
DAbstractCollectionTest.java31 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/
DAbstractInterruptibleChannel.java42 private final Runnable interruptAndCloseRunnable = new Runnable() {
DAbstractSelector.java40 private final Runnable wakeupRunnable = new Runnable() {
/libcore/luni/src/test/java/libcore/java/lang/ref/
DReferenceQueueTest.java45 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/
DRunnable.java25 public interface Runnable { interface

12345