Home
last modified time | relevance | path

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

123456789

/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 …]
DScheduledExecutorTest.java56 final Runnable task = new CheckedRunnable() { in testExecute()
92 Runnable task = new CheckedRunnable() { in testSchedule3()
112 Runnable task = new CheckedRunnable() { in testSchedule4()
134 Runnable task = new CheckedRunnable() { in testSchedule5()
148 static class RunnableCounter implements Runnable {
165 final Runnable task = new CheckedRunnable() { in testFixedRateSequence()
197 final Runnable task = new CheckedRunnable() { in testFixedDelaySequence()
589 Runnable r = new CheckedRunnable() { in testGetQueue()
597 BlockingQueue<Runnable> q = p.getQueue(); in testGetQueue()
613 Runnable r = new CheckedRunnable() { in testRemove()
[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 …]
DJSR166TestCase.java300 Runnable checkForWedgedTest = new Runnable() { public void run() {
955 private final Runnable releaser;
956 public PoolCleanerWithReleaser(ExecutorService pool, Runnable releaser) { in PoolCleanerWithReleaser()
973 PoolCleaner cleaner(ExecutorService pool, Runnable releaser) { in cleaner()
981 Runnable releaser(final CountDownLatch latch) { in releaser()
982 return new Runnable() { public void run() { in releaser()
992 Runnable releaser(final AtomicBoolean flag) {
993 return new Runnable() { public void run() { flag.set(true); }};
1202 public void runWithPermissions(Runnable r, Permission... permissions) {
1217 public void runWithSecurityManagerWithPermissions(Runnable r,
[all …]
DExecutorsTest.java229 final Runnable task = new CheckedRunnable() { in testNewSingleThreadScheduledExecutor()
253 final Runnable task = new CheckedRunnable() { in testNewScheduledThreadPool()
279 final Runnable task = new CheckedRunnable() { in testUnconfigurableScheduledExecutorService()
307 final Runnable sleeper = new CheckedInterruptedRunnable() { in testTimedCallable()
333 Runnable r = new CheckedRunnable() { in testDefaultThreadFactory()
366 Runnable r = new CheckedRunnable() { in testPrivilegedThreadFactory()
371 Runnable r = new CheckedRunnable() { in testPrivilegedThreadFactory()
435 Runnable r = new CheckedRunnable() { in testCreatePrivilegedCallableUsingCCLWithNoPrivs()
453 Runnable r = new CheckedRunnable() { in testPrivilegedCallableUsingCCLWithPrivs()
472 Runnable r = new CheckedRunnable() { in testPrivilegedCallableWithNoPrivs()
[all …]
DScheduledExecutorTest.java78 final Runnable task = new CheckedRunnable() { in testExecute()
114 Runnable task = new CheckedRunnable() { in testSchedule3()
134 Runnable task = new CheckedRunnable() { in testSchedule4()
156 Runnable task = new CheckedRunnable() { in testSchedule5()
170 static class RunnableCounter implements Runnable {
187 final Runnable task = new CheckedRunnable() { in testFixedRateSequence()
219 final Runnable task = new CheckedRunnable() { in testFixedDelaySequence()
610 Runnable r = new CheckedRunnable() { in testGetQueue()
618 BlockingQueue<Runnable> q = p.getQueue(); in testGetQueue()
634 Runnable r = new CheckedRunnable() { in testRemove()
[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.java98 new LinkedBlockingQueue<Runnable>()); in newFixedThreadPool()
161 new LinkedBlockingQueue<Runnable>(), in newFixedThreadPool()
182 new LinkedBlockingQueue<Runnable>())); in newSingleThreadExecutor()
203 new LinkedBlockingQueue<Runnable>(), in newSingleThreadExecutor()
226 new SynchronousQueue<Runnable>()); in newCachedThreadPool()
241 new SynchronousQueue<Runnable>(), in newCachedThreadPool()
381 public static <T> Callable<T> callable(Runnable task, T result) { in callable()
394 public static Callable<Object> callable(Runnable task) { in callable()
455 private final Runnable task;
457 RunnableAdapter(Runnable task, T result) {
[all …]
DThreadPoolExecutor.java466 private final BlockingQueue<Runnable> workQueue;
614 implements Runnable
625 Runnable firstTask;
633 Worker(Runnable firstTask) { in Worker()
847 final void reject(Runnable command) { in reject()
876 private List<Runnable> drainQueue() { in drainQueue()
877 BlockingQueue<Runnable> q = workQueue; in drainQueue()
878 ArrayList<Runnable> taskList = new ArrayList<>(); in drainQueue()
881 for (Runnable r : q.toArray(new Runnable[0])) { in drainQueue()
919 private boolean addWorker(Runnable firstTask, boolean core) { in addWorker()
[all …]
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()
DScheduledThreadPoolExecutor.java209 ScheduledFutureTask(Runnable r, V result, long triggerTime, in ScheduledFutureTask()
221 ScheduledFutureTask(Runnable r, V result, long triggerTime, in ScheduledFutureTask()
367 BlockingQueue<Runnable> q = super.getQueue(); in onShutdown()
408 Runnable runnable, RunnableScheduledFuture<V> task) { in decorateTask()
553 public ScheduledFuture<?> schedule(Runnable command, in schedule()
588 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, in scheduleAtFixedRate()
613 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, in scheduleWithFixedDelay()
653 public void execute(Runnable command) { in execute()
663 public Future<?> submit(Runnable task) { in submit()
671 public <T> Future<T> submit(Runnable task, T result) { in submit()
[all …]
DScheduledExecutorService.java110 public ScheduledFuture<?> schedule(Runnable command, in schedule()
168 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, in scheduleAtFixedRate()
208 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, in scheduleWithFixedDelay()
DExecutorService.java171 List<Runnable> shutdownNow(); in shutdownNow()
241 <T> Future<T> submit(Runnable task, T result); in submit()
254 Future<?> submit(Runnable task); in submit()
/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/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/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/hiddenapi/sun/misc/
DCleaner.java33 private Cleaner(java.lang.Object referent, java.lang.Runnable thunk) { in Cleaner()
47 public static sun.misc.Cleaner create(java.lang.Object ob, java.lang.Runnable thunk) { in create()
68 private final java.lang.Runnable thunk;
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DStreamCloseTest.java49 Runnable closer = () -> { holder[0] = true; }; in testOneCloseHandler()
78 Runnable close1 = () -> { holder[0] = true; }; in testTwoCloseHandlers()
79 Runnable close2 = () -> { holder[1] = true; }; in testTwoCloseHandlers()
109 Runnable close1 = () -> { holder[0] = true; throw new RuntimeException("1"); }; in testCascadedExceptions()
110 Runnable close2 = () -> { holder[1] = true; throw new RuntimeException("2"); }; in testCascadedExceptions()
111 Runnable close3 = () -> { holder[2] = true; throw new RuntimeException("3"); }; in testCascadedExceptions()

123456789