Home
last modified time | relevance | path

Searched refs:runnables (Results 1 – 13 of 13) sorted by relevance

/external/robolectric-shadows/utils/src/main/java/org/robolectric/util/
DScheduler.java62 private final PriorityQueue<ScheduledRunnable> runnables = new PriorityQueue<>(); field in Scheduler
160 runnables.add(new ScheduledRunnable(runnable, currentTime + delayMillis)); in postDelayed()
174 if (runnables.isEmpty()) { in postAtFrontOfQueue()
177 timeDisambiguator = runnables.peek().timeDisambiguator - 1; in postAtFrontOfQueue()
179 runnables.add(new ScheduledRunnable(runnable, 0, timeDisambiguator)); in postAtFrontOfQueue()
191 Iterator<ScheduledRunnable> iterator = runnables.iterator(); in remove()
207 for (ScheduledRunnable scheduled : runnables) { in advanceToLastPostedRunnable()
221 return !runnables.isEmpty() && advanceTo(runnables.peek().scheduledTime); in advanceToNextPostedRunnable()
253 if (endTime < currentTime || runnables.isEmpty()) { in advanceTo()
273 ScheduledRunnable postedRunnable = runnables.poll(); in runOneTask()
[all …]
/external/crosvm/cros_async/src/
Dqueue.rs13 runnables: Mutex<VecDeque<Runnable>>, field
20 runnables: Mutex::new(VecDeque::new()), in new()
26 self.runnables.lock().push_back(runnable); in push_back()
31 self.runnables.lock().pop_front() in pop_front()
/external/guava/android/guava/src/com/google/common/util/concurrent/
DExecutionList.java53 private RunnableExecutorPair runnables; field in ExecutionList
80 runnables = new RunnableExecutorPair(runnable, executor, runnables); in add()
111 list = runnables; in execute()
112 runnables = null; // allow GC to free listeners even if this stays around for a while. in execute()
/external/guava/guava/src/com/google/common/util/concurrent/
DExecutionList.java52 private @Nullable RunnableExecutorPair runnables; field in ExecutionList
79 runnables = new RunnableExecutorPair(runnable, executor, runnables); in add()
110 list = runnables; in execute()
111 runnables = null; // allow GC to free listeners even if this stays around for a while. in execute()
/external/exoplayer/tree/testutils/src/test/java/com/google/android/exoplayer2/testutil/
DFakeDataSourceTest.java155 TestRunnable[] runnables = new TestRunnable[3]; in testRunnable() local
157 runnables[i] = new TestRunnable(); in testRunnable()
164 .appendReadAction(runnables[0]) in testRunnable()
166 .appendReadAction(runnables[1]) in testRunnable()
167 .appendReadAction(runnables[2]) in testRunnable()
174 assertThat(runnables[i].ran).isFalse(); in testRunnable()
178 assertThat(runnables[0].ran).isTrue(); in testRunnable()
179 assertThat(runnables[1].ran).isFalse(); in testRunnable()
180 assertThat(runnables[2].ran).isFalse(); in testRunnable()
184 assertThat(runnables[i].ran).isTrue(); in testRunnable()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/android/util/concurrent/
DRoboExecutorService.java23 private final HashSet<Runnable> runnables = new HashSet<>(); field in RoboExecutorService
60 for (Runnable runnable : runnables) { in shutdownNow()
64 runnables.clear(); in shutdownNow()
104 runnables.remove(this); in schedule()
107 runnables.add(runnable); in schedule()
/external/guava/android/guava-tests/benchmark/com/google/common/util/concurrent/
DExecutionListBenchmark.java378 final Queue<OldExecutionList.RunnableExecutorPair> runnables = Lists.newLinkedList();
387 synchronized (runnables) {
389 runnables.add(new RunnableExecutorPair(runnable, executor));
401 synchronized (runnables) {
408 while (!runnables.isEmpty()) {
409 runnables.poll().execute();
443 private RunnableExecutorPair runnables;
454 runnables = new RunnableExecutorPair(runnable, executor, runnables);
468 list = runnables;
469 runnables = null; // allow GC to free listeners even if this stays around for a while.
/external/guava/guava-tests/benchmark/com/google/common/util/concurrent/
DExecutionListBenchmark.java378 final Queue<OldExecutionList.RunnableExecutorPair> runnables = Lists.newLinkedList();
387 synchronized (runnables) {
389 runnables.add(new RunnableExecutorPair(runnable, executor));
401 synchronized (runnables) {
408 while (!runnables.isEmpty()) {
409 runnables.poll().execute();
443 private RunnableExecutorPair runnables;
454 runnables = new RunnableExecutorPair(runnable, executor, runnables);
468 list = runnables;
469 runnables = null; // allow GC to free listeners even if this stays around for a while.
/external/mockito/src/test/java/org/mockitoutil/
DConcurrentTesting.java28 public static void concurrently(Runnable ... runnables) throws InterruptedException { in concurrently() argument
30 for (Runnable r : runnables) { in concurrently()
/external/grpc-grpc-java/okhttp/src/test/java/io/grpc/okhttp/
DAsyncFrameWriterTest.java126 private final Queue<Runnable> runnables = new ConcurrentLinkedQueue<Runnable>(); field in AsyncFrameWriterTest.QueueingExecutor
130 runnables.add(command); in execute()
135 while ((r = runnables.poll()) != null) { in runAll()
/external/testng/src/main/java/org/testng/internal/thread/graph/
DGraphThreadPoolExecutor.java62 List<IWorker<T>> runnables = m_factory.createWorkers(freeNodes); in runNodes() local
63 for (IWorker<T> r : runnables) { in runNodes()
/external/grpc-grpc-java/context/src/test/java/io/grpc/
DContextTest.java534 assertEquals(1, queuedExecutor.runnables.size()); in currentContextExecutor()
535 queuedExecutor.runnables.remove().run(); in currentContextExecutor()
544 assertEquals(1, queuedExecutor.runnables.size()); in fixedContextExecutor()
545 queuedExecutor.runnables.remove().run(); in fixedContextExecutor()
712 private final Queue<Runnable> runnables = new ArrayDeque<Runnable>(); field in ContextTest.QueuedExecutor
716 runnables.add(r); in execute()
/external/testng/src/main/java/org/testng/
DTestRunner.java780 List<IWorker<ITestNGMethod>> runnables = createWorkers(freeNodes); in privateRun() local
781 for (IWorker<ITestNGMethod> r : runnables) { in privateRun()