Home
last modified time | relevance | path

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

12345678910

/libcore/jsr166-tests/src/test/java/jsr166/
DThreadPoolExecutorTest.java56 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in ExtendedTPE()
58 protected void beforeExecute(Thread t, Runnable r) { in beforeExecute()
61 protected void afterExecute(Runnable r, Throwable t) { in afterExecute()
81 public Thread newThread(Runnable r) { in newThread()
94 new ArrayBlockingQueue<Runnable>(10)); in testExecute()
97 final Runnable task = new CheckedRunnable() { in testExecute()
113 new ArrayBlockingQueue<Runnable>(10)); in testGetActiveCount()
135 new ArrayBlockingQueue<Runnable>(10)); in testPrestartCoreThread()
161 new ArrayBlockingQueue<Runnable>(10)); in testPrestartAllCoreThreads()
184 new ArrayBlockingQueue<Runnable>(10)); in testGetCompletedTaskCount()
[all …]
DThreadPoolExecutorSubclassTest.java66 CustomTask(final Runnable r, final V res) { in CustomTask()
156 protected <V> RunnableFuture<V> newTaskFor(Runnable r, V v) { in newTaskFor()
164 BlockingQueue<Runnable> workQueue) { in CustomTPE()
172 BlockingQueue<Runnable> workQueue, in CustomTPE()
182 BlockingQueue<Runnable> workQueue, in CustomTPE()
191 BlockingQueue<Runnable> workQueue, in CustomTPE()
203 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in CustomTPE()
205 protected void beforeExecute(Thread t, Runnable r) { in beforeExecute()
208 protected void afterExecute(Runnable r, Throwable t) { in afterExecute()
228 public Thread newThread(Runnable r) { in newThread()
[all …]
DJSR166TestCase.java222 Runnable checkForWedgedTest = new Runnable() { public void run() {
864 private final Runnable releaser;
865 public PoolCleanerWithReleaser(ExecutorService pool, Runnable releaser) { in PoolCleanerWithReleaser()
882 PoolCleaner cleaner(ExecutorService pool, Runnable releaser) { in cleaner()
890 Runnable releaser(final CountDownLatch latch) { in releaser()
891 return new Runnable() { public void run() { in releaser()
901 Runnable releaser(final AtomicBoolean flag) {
902 return new Runnable() { public void run() { flag.set(true); }};
1091 public void runWithPermissions(Runnable r, Permission... permissions) {
1108 public void runWithSecurityManagerWithPermissions(Runnable r,
[all …]
DExecutorsTest.java206 final Runnable task = new CheckedRunnable() { in testNewSingleThreadScheduledExecutor()
230 final Runnable task = new CheckedRunnable() { in testNewScheduledThreadPool()
256 final Runnable task = new CheckedRunnable() { in testUnconfigurableScheduledExecutorService()
284 final Runnable sleeper = new CheckedInterruptedRunnable() { in testTimedCallable()
310 Runnable r = new CheckedRunnable() { in testDefaultThreadFactory()
343 Runnable r = new CheckedRunnable() { in testPrivilegedThreadFactory()
349 Runnable r = new CheckedRunnable() { in testPrivilegedThreadFactory()
412 Runnable r = new CheckedRunnable() { in testCreatePrivilegedCallableUsingCCLWithNoPrivs()
430 Runnable r = new CheckedRunnable() { in testPrivilegedCallableUsingCCLWithPrivs()
449 Runnable r = new CheckedRunnable() { in testPrivilegedCallableWithNoPrivs()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DThreadPoolExecutorTest.java78 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in ExtendedTPE()
80 protected void beforeExecute(Thread t, Runnable r) { in beforeExecute()
83 protected void afterExecute(Runnable r, Throwable t) { in afterExecute()
103 public Thread newThread(Runnable r) { in newThread()
116 new ArrayBlockingQueue<Runnable>(10)); in testExecute()
119 final Runnable task = new CheckedRunnable() { in testExecute()
135 new ArrayBlockingQueue<Runnable>(10)); in testGetActiveCount()
157 new ArrayBlockingQueue<Runnable>(10)); in testPrestartCoreThread()
183 new ArrayBlockingQueue<Runnable>(10)); in testPrestartAllCoreThreads()
206 new ArrayBlockingQueue<Runnable>(10)); in testGetCompletedTaskCount()
[all …]
DThreadPoolExecutorSubclassTest.java88 CustomTask(final Runnable r, final V res) { in CustomTask()
178 protected <V> RunnableFuture<V> newTaskFor(Runnable r, V v) { in newTaskFor()
186 BlockingQueue<Runnable> workQueue) { in CustomTPE()
194 BlockingQueue<Runnable> workQueue, in CustomTPE()
204 BlockingQueue<Runnable> workQueue, in CustomTPE()
213 BlockingQueue<Runnable> workQueue, in CustomTPE()
225 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in CustomTPE()
227 protected void beforeExecute(Thread t, Runnable r) { in beforeExecute()
230 protected void afterExecute(Runnable r, Throwable t) { in afterExecute()
250 public Thread newThread(Runnable r) { in newThread()
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DAsynchronousChannelGroupImpl.java65 private final Queue<Runnable> taskQueue;
79 taskQueue = new ConcurrentLinkedQueue<Runnable>(); in AsynchronousChannelGroupImpl()
107 private Runnable bindToGroup(final Runnable task) { in bindToGroup()
109 return new Runnable() { in bindToGroup()
117 private void startInternalThread(final Runnable task) {
129 protected final void startThreads(Runnable task) {
156 final int threadExit(Runnable task, boolean replaceMe) {
177 abstract void executeOnHandlerTask(Runnable task);
184 final void executeOnPooledThread(Runnable task) {
192 final void offerTask(Runnable task) {
[all …]
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/
DThreadPoolExecutor.java48 java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue) { in ThreadPoolExecutor()
57 java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue, in ThreadPoolExecutor()
67 java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue, in ThreadPoolExecutor()
77 java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue, in ThreadPoolExecutor()
143 final void reject(java.lang.Runnable command) { in reject()
155 private java.util.List<java.lang.Runnable> drainQueue() { in drainQueue()
159 private boolean addWorker(java.lang.Runnable firstTask, boolean core) { in addWorker()
172 private java.lang.Runnable getTask() { in getTask()
180 public void execute(java.lang.Runnable command) { in execute()
188 public java.util.List<java.lang.Runnable> shutdownNow() { in shutdownNow()
[all …]
DExecutors.java120 public static <T> java.util.concurrent.Callable<T> callable(java.lang.Runnable task, T result) { in callable()
125 java.lang.Runnable task) { in callable()
156 public java.lang.Thread newThread(java.lang.Runnable r) { in newThread()
193 public void execute(java.lang.Runnable command) { in execute()
201 public java.util.List<java.lang.Runnable> shutdownNow() { in shutdownNow()
218 public java.util.concurrent.Future<?> submit(java.lang.Runnable task) { in submit()
226 public <T> java.util.concurrent.Future<T> submit(java.lang.Runnable task, T result) { in submit()
277 java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit) { in schedule()
289 java.lang.Runnable command, in scheduleAtFixedRate()
297 java.lang.Runnable command, in scheduleWithFixedDelay()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DExecutors.java99 new LinkedBlockingQueue<Runnable>()); in newFixedThreadPool()
162 new LinkedBlockingQueue<Runnable>(), in newFixedThreadPool()
183 new LinkedBlockingQueue<Runnable>())); in newSingleThreadExecutor()
202 new LinkedBlockingQueue<Runnable>(), in newSingleThreadExecutor()
225 new SynchronousQueue<Runnable>()); in newCachedThreadPool()
241 new SynchronousQueue<Runnable>(), in newCachedThreadPool()
390 public static <T> Callable<T> callable(Runnable task, T result) { in callable()
403 public static Callable<Object> callable(Runnable task) { in callable()
480 private final Runnable task;
482 RunnableAdapter(Runnable task, T result) {
[all …]
DThreadPoolExecutor.java459 private final BlockingQueue<Runnable> workQueue;
612 implements Runnable
625 Runnable firstTask;
636 Worker(Runnable firstTask) { in Worker()
841 final void reject(Runnable command) { in reject()
859 private List<Runnable> drainQueue() { in drainQueue()
860 BlockingQueue<Runnable> q = workQueue; in drainQueue()
861 ArrayList<Runnable> taskList = new ArrayList<>(); in drainQueue()
864 for (Runnable r : q.toArray(new Runnable[0])) { in drainQueue()
902 private boolean addWorker(Runnable firstTask, boolean core) { in addWorker()
[all …]
DScheduledThreadPoolExecutor.java216 ScheduledFutureTask(Runnable r, V result, long triggerTime, in ScheduledFutureTask()
228 ScheduledFutureTask(Runnable r, V result, long triggerTime, in ScheduledFutureTask()
377 BlockingQueue<Runnable> q = super.getQueue(); in onShutdown()
415 Runnable runnable, RunnableScheduledFuture<V> task) { in decorateTask()
560 public ScheduledFuture<?> schedule(Runnable command, in schedule()
623 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, in scheduleAtFixedRate()
671 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, in scheduleWithFixedDelay()
711 public void execute(Runnable command) { in execute()
721 public Future<?> submit(Runnable task) { in submit()
729 public <T> Future<T> submit(Runnable task, T result) { in submit()
[all …]
DScheduledExecutorService.java106 public ScheduledFuture<?> schedule(Runnable command, in schedule()
164 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, in scheduleAtFixedRate()
204 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, in scheduleWithFixedDelay()
DCompletionStage.java262 public CompletionStage<Void> thenRun(Runnable action); in thenRun()
276 public CompletionStage<Void> thenRunAsync(Runnable action); in thenRunAsync()
290 public CompletionStage<Void> thenRunAsync(Runnable action, in thenRunAsync()
425 Runnable action); in runAfterBoth()
440 Runnable action); in runAfterBothAsync()
457 Runnable action, in runAfterBothAsync()
585 Runnable action); in runAfterEither()
602 Runnable action); in runAfterEitherAsync()
620 Runnable action, in runAfterEitherAsync()
/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/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/lang/invoke/
DDeserializeMethodTest.java59 Runnable r = (Runnable & Serializable) () -> { }; in foo()
69 Runnable r = () -> { }; in foo()
80 Runnable r = (Runnable & Marker) () -> { }; in foo()
/libcore/ojluni/src/test/java/lang/StackWalker/
DCallerFromMain.java69 Thread t1 = new Thread(new Runnable() { in main()
98 Thread t4 = new MyThread(new Runnable() { in main()
119 final Runnable runnable;
120 MyThread(Runnable runnable) { in MyThread()
129 static class MyRunnable implements Runnable {
DVerifyStackTrace.java212 public static class Handle implements Runnable {
214 Runnable impl;
215 public Handle(Runnable run) { in Handle()
219 public void execute(Runnable run) { in execute()
228 MethodType.methodType(void.class, Runnable.class)); in run()
277 public static void invoke(Runnable run) { in invoke()
299 final Runnable run = () -> test.walker().forEach( in test()
310 .getMethod("invoke", Runnable.class) in test()
/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/ojluni/src/test/java/lang/ref/
DBasicTest.java58 static void fork(Runnable proc) throws InterruptedException { in fork()
65 fork(new Runnable() { in showReferences()
76 fork(new Runnable() { in createNoise()
86 fork(new Runnable() { in test()
120 fork(new Runnable() { in test()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DThrowableHelper.java30 public static void checkException(Class<? extends Exception> ce, Runnable r) { in checkException()
42 public static void checkNPE(Runnable r) { in checkNPE()
46 public static void checkISE(Runnable r) { in checkISE()
/libcore/ojluni/src/main/java/sun/misc/
DCleaner.java111 private final Runnable thunk;
113 private Cleaner(Object referent, Runnable thunk) { in Cleaner()
141 public Runnable getThunk() { in getThunk()
157 public static Cleaner create(Object ob, Runnable thunk) { in create()
/libcore/ojluni/src/main/java/jdk/internal/misc/
DInnocuousThread.java56 public static Thread newThread(Runnable target) { in newThread()
64 public static Thread newThread(String name, Runnable target) { in newThread()
81 public static Thread newSystemThread(Runnable target) {
88 public static Thread newSystemThread(String name, Runnable target) {
99 private InnocuousThread(ThreadGroup group, Runnable target, String name, ClassLoader tccl) {
/libcore/ojluni/annotations/hiddenapi/java/lang/
DThread.java32 public class Thread implements java.lang.Runnable {
38 public Thread(java.lang.Runnable target) { in Thread()
42 Thread(java.lang.Runnable target, java.security.AccessControlContext acc) { in Thread()
46 public Thread(java.lang.ThreadGroup group, java.lang.Runnable target) { in Thread()
63 public Thread(java.lang.Runnable target, java.lang.String name) { in Thread()
67 public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name) { in Thread()
73 java.lang.Runnable target, in Thread()
108 java.lang.Runnable target, in init()
116 java.lang.Runnable target, in init()
422 private java.lang.Runnable target;
/libcore/ojluni/annotations/mmodule/java/lang/
DThread.annotated.java38 public class Thread implements java.lang.Runnable {
42 public Thread(java.lang.Runnable target) { throw new RuntimeException("Stub!"); } in Thread()
44 public Thread(java.lang.ThreadGroup group, java.lang.Runnable target) { throw new RuntimeException(… in Thread()
50 public Thread(java.lang.Runnable target, java.lang.String name) { throw new RuntimeException("Stub!… in Thread()
52 public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name) { thro… in Thread()
54 public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long s… in Thread()

12345678910