/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/android/util/concurrent/ |
D | RoboExecutorServiceTest.java | 21 private final RoboExecutorService executorService = new RoboExecutorService(); field in RoboExecutorServiceTest 38 executorService.execute(runnable); in execute_shouldRunStuffOnBackgroundThread() 48 Future<String> future = executorService.submit(runnable, "foo"); in submitRunnable_shouldRunStuffOnBackgroundThread() 62 Future<String> future = executorService.submit(new Callable<String>() { in submitCallable_shouldRunStuffOnBackgroundThread() 82 assertThat(executorService.isShutdown()).isFalse(); in byDefault_IsNotShutdown() 87 assertThat(executorService.isTerminated()).isFalse(); in byDefault_IsNotTerminated() 92 executorService.execute(runnable); in whenShutdownBeforeSubmittedTasksAreExecuted_TaskIsNotInTranscript() 94 executorService.shutdown(); in whenShutdownBeforeSubmittedTasksAreExecuted_TaskIsNotInTranscript() 102 executorService.execute(runnable); in whenShutdownNow_ReturnedListContainsOneRunnable() 104 List<Runnable> notExecutedRunnables = executorService.shutdownNow(); in whenShutdownNow_ReturnedListContainsOneRunnable() [all …]
|
/external/downloader/src/test/java/com/google/android/downloader/ |
D | TestExecutorRule.java | 68 ExecutorService executorService = Executors.newSingleThreadExecutor(threadFactory); in newSingleThreadExecutor() local 69 executorServices.add(executorService); in newSingleThreadExecutor() 70 return executorService; in newSingleThreadExecutor() 81 ScheduledExecutorService executorService = in newSingleThreadScheduledExecutor() local 83 executorServices.add(executorService); in newSingleThreadScheduledExecutor() 84 return executorService; in newSingleThreadScheduledExecutor() 90 for (ExecutorService executorService : executorServices) { in after() 92 executorService.shutdown(); in after() 93 assertThat(executorService.awaitTermination(timeout.toMillis(), MILLISECONDS)).isTrue(); in after()
|
D | PlatformUrlEngineTest.java | 44 private ListeningExecutorService executorService; field in PlatformUrlEngineTest 48 executorService = listeningDecorator(newSingleThreadExecutor()); in setUp() 51 temporaryFolder, new TestingExecutorService(executorService)); in setUp() 54 executorService, /* connectTimeoutMs= */ 1000, /* readTimeoutMs= */ 1000); in setUp() 60 executorService.shutdown(); in tearDown()
|
D | CronetUrlEngineTest.java | 48 ExecutorService executorService = Executors.newSingleThreadExecutor(); in setUp() local 49 TestingExecutorService testingExecutorService = new TestingExecutorService(executorService); in setUp() 53 engine = new CronetUrlEngine(cronetEngine, executorService); in setUp()
|
D | MockWebServerUrlEngineTestHelper.java | 49 private final TestingExecutorService executorService; field in MockWebServerUrlEngineTestHelper 53 TemporaryFolder temporaryFolder, TestingExecutorService executorService) { in MockWebServerUrlEngineTestHelper() argument 55 this.executorService = executorService; in MockWebServerUrlEngineTestHelper() 293 executorService.pause(); in executeRequest_requestCanceled_requestNeverSent() 302 executorService.resume(); in executeRequest_requestCanceled_requestNeverSent()
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/ |
D | Dispatcher.java | 41 private ExecutorService executorService; field in Dispatcher 52 public Dispatcher(ExecutorService executorService) { in Dispatcher() argument 53 this.executorService = executorService; in Dispatcher() 60 if (executorService == null) { in getExecutorService() 61 executorService = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60, TimeUnit.SECONDS, in getExecutorService() 64 return executorService; in getExecutorService()
|
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/ |
D | Dispatcher.java | 43 private ExecutorService executorService; field in Dispatcher 54 public Dispatcher(ExecutorService executorService) { in Dispatcher() argument 55 this.executorService = executorService; in Dispatcher() 62 if (executorService == null) { in getExecutorService() 63 executorService = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60, TimeUnit.SECONDS, in getExecutorService() 66 return executorService; in getExecutorService()
|
/external/okio/okio/src/jvmTest/kotlin/okio/ |
D | ThrottlerTest.kt | 34 private val executorService = Executors.newFixedThreadPool(threads) constant in okio.ThrottlerTest 44 executorService.shutdown() in teardown() 89 executorService.submit { in parallel() 102 executorService.submit { in parallelFastThenSlower() 117 executorService.submit { in parallelSlowThenFaster() 132 executorService.submit { in parallelIndividualThrottle() 148 executorService.submit { in parallelGroupAndIndividualThrottle()
|
/external/grpc-grpc-java/core/src/jmh/java/io/grpc/internal/ |
D | SerializingExecutorBenchmark.java | 43 private ExecutorService executorService = Executors.newSingleThreadExecutor(); field in SerializingExecutorBenchmark 44 private Executor executor = new SerializingExecutor(executorService); 67 executorService.shutdownNow(); in tearDown() 68 if (!executorService.awaitTermination(1, TimeUnit.SECONDS)) { in tearDown()
|
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/ |
D | JdkFutureAdaptersTest.java | 104 ExecutorService executorService = in testListenInPoolThreadUsesGivenExecutor() local 107 ExecutorSpy spy = new ExecutorSpy(executorService); in testListenInPoolThreadUsesGivenExecutor() 117 listenableFuture.addListener(singleCallListener, executorService); in testListenInPoolThreadUsesGivenExecutor() 129 ExecutorService executorService = in testListenInPoolThreadCustomExecutorInterrupted() local 143 ListenableFuture<String> listenableFuture = listenInPoolThread(abstractFuture, executorService); in testListenInPoolThreadCustomExecutorInterrupted() 158 executorService.shutdownNow(); in testListenInPoolThreadCustomExecutorInterrupted()
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | JdkFutureAdaptersTest.java | 104 ExecutorService executorService = in testListenInPoolThreadUsesGivenExecutor() local 107 ExecutorSpy spy = new ExecutorSpy(executorService); in testListenInPoolThreadUsesGivenExecutor() 117 listenableFuture.addListener(singleCallListener, executorService); in testListenInPoolThreadUsesGivenExecutor() 129 ExecutorService executorService = in testListenInPoolThreadCustomExecutorInterrupted() local 143 ListenableFuture<String> listenableFuture = listenInPoolThread(abstractFuture, executorService); in testListenInPoolThreadCustomExecutorInterrupted() 158 executorService.shutdownNow(); in testListenInPoolThreadCustomExecutorInterrupted()
|
D | ListeningScheduledExecutorServiceTest.java | 37 private final ListeningScheduledExecutorService executorService = new FakeExecutorService(); field in ListeningScheduledExecutorServiceTest 42 ListenableScheduledFuture<?> future = executorService.schedule(command, Duration.ofSeconds(12)); in testScheduleRunnable() 54 executorService.schedule(callable, Duration.ofMinutes(12)); in testScheduleCallable() 65 executorService.scheduleAtFixedRate(command, Duration.ofDays(2), Duration.ofHours(4)); in testScheduleAtFixedRate() 78 executorService.scheduleWithFixedDelay(command, Duration.ofDays(8), Duration.ofHours(16)); in testScheduleWithFixedDelay()
|
/external/okio/okio/src/jvmTest/java/okio/ |
D | PipeTest.java | 34 final ScheduledExecutorService executorService = Executors.newScheduledThreadPool(2); field in PipeTest 37 executorService.shutdown(); in tearDown() 65 Future<ByteString> sinkHash = executorService.submit(new Callable<ByteString>() { in largeDataset() 84 Future<ByteString> sourceHash = executorService.submit(new Callable<ByteString>() { in largeDataset() 159 executorService.execute(new Runnable() { in sinkBlocksOnSlowReader() 188 executorService.schedule(new Runnable() { in sinkWriteFailsByClosedReader() 293 executorService.schedule(new Runnable() { in sourceReadUnblockedByClosedSink() 327 executorService.execute(new Runnable() { in sourceBlocksOnSlowWriter()
|
D | WaitUntilNotifiedTest.java | 30 final ScheduledExecutorService executorService = Executors.newScheduledThreadPool(0); field in WaitUntilNotifiedTest 33 executorService.shutdown(); in tearDown() 41 executorService.schedule(new Runnable() { in notified()
|
/external/mockito/src/test/java/org/mockitousage/serialization/ |
D | ParallelSerializationTest.java | 28 final ExecutorService executorService = Executors.newFixedThreadPool(threadingFactor); in single_mock_being_serialized_in_different_classloaders_by_multiple_threads() local 41 futures.add(executorService.submit(new Callable<Object>() { in single_mock_being_serialized_in_different_classloaders_by_multiple_threads() 52 executorService.submit(new Callable<Object>() { in single_mock_being_serialized_in_different_classloaders_by_multiple_threads()
|
/external/dagger2/javatests/dagger/functional/producers/badexecutor/ |
D | BadExecutorTest.java | 48 ListeningExecutorService executorService = MoreExecutors.newDirectExecutorService(); in setUpComponent() local 51 .executorModule(new ExecutorModule(executorService)) in setUpComponent() 54 executorService.shutdown(); in setUpComponent()
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/ |
D | ExecutorsTest.kt | 101 val executorService = Executors.newSingleThreadExecutor { r -> Thread(r, "TestExecutor") } in <lambda>() constant 102 val dispatcher = executorService.asCoroutineDispatcher() in <lambda>() 107 check(executorService.isShutdown) in <lambda>()
|
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/zip/ |
D | ParallelScatterZipCreator.java | 109 public ParallelScatterZipCreator(final ExecutorService executorService) { in ParallelScatterZipCreator() argument 110 this(executorService, new DefaultBackingStoreSupplier()); in ParallelScatterZipCreator() 120 public ParallelScatterZipCreator(final ExecutorService executorService, in ParallelScatterZipCreator() argument 123 es = executorService; in ParallelScatterZipCreator()
|
/external/guava/android/guava-tests/benchmark/com/google/common/util/concurrent/ |
D | ExecutionListBenchmark.java | 225 private ThreadPoolExecutor executorService; 244 executorService = 251 executorService.prestartAllCoreThreads(); 257 executorService.submit( 269 executorService.shutdown(); 338 Future<?> possiblyIgnoredError = executorService.submit(addTask); 341 Future<?> possiblyIgnoredError = executorService.submit(executeTask); 364 Future<?> possiblyIgnoredError = executorService.submit(executeTask); 367 Future<?> possiblyIgnoredError1 = executorService.submit(addTask);
|
/external/guava/guava-tests/benchmark/com/google/common/util/concurrent/ |
D | ExecutionListBenchmark.java | 225 private ThreadPoolExecutor executorService; 244 executorService = 251 executorService.prestartAllCoreThreads(); 257 executorService.submit( 269 executorService.shutdown(); 338 Future<?> possiblyIgnoredError = executorService.submit(addTask); 341 Future<?> possiblyIgnoredError = executorService.submit(executeTask); 364 Future<?> possiblyIgnoredError = executorService.submit(executeTask); 367 Future<?> possiblyIgnoredError1 = executorService.submit(addTask);
|
/external/ukey2/src/main/javatest/com/google/security/cryptauth/lib/securegcm/ |
D | Ukey2ShellCppWrapper.java | 65 private final ExecutorService executorService; field in Ukey2ShellCppWrapper 77 this.executorService = Executors.newSingleThreadExecutor(); in Ukey2ShellCppWrapper() 198 executorService.submit( in readFrameWithTimeout() 221 executorService.submit( in writeFrameWithTimeout()
|
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/ |
D | PlayerMessageTest.java | 98 ExecutorService executorService = Executors.newSingleThreadExecutor(); in experimental_blockUntilDelivered_markAsProcessedWhileBlocked_succeeds() local 100 executorService.submit( in experimental_blockUntilDelivered_markAsProcessedWhileBlocked_succeeds() 122 executorService.shutdown(); in experimental_blockUntilDelivered_markAsProcessedWhileBlocked_succeeds()
|
/external/guava/android/guava/src/com/google/common/util/concurrent/ |
D | AbstractScheduledService.java | 174 @NullableDecl private volatile ScheduledExecutorService executorService; 214 executorService = 223 executorService.execute( 230 runningTask = scheduler().schedule(delegate, executorService, task); 248 executorService.execute(
|
/external/guava/guava/src/com/google/common/util/concurrent/ |
D | AbstractScheduledService.java | 203 private volatile @Nullable ScheduledExecutorService executorService; 243 executorService = 252 executorService.execute( 259 runningTask = scheduler().schedule(delegate, executorService, task); 277 executorService.execute(
|
D | MoreExecutors.java | 730 ListeningExecutorService executorService, in invokeAnyImpl() argument 736 executorService, tasks, timed, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); in invokeAnyImpl() 745 ListeningExecutorService executorService, in invokeAnyImpl() argument 751 checkNotNull(executorService); in invokeAnyImpl() 772 futures.add(submitAndAddQueueListener(executorService, it.next(), futureQueue)); in invokeAnyImpl() 781 futures.add(submitAndAddQueueListener(executorService, it.next(), futureQueue)); in invokeAnyImpl() 825 ListeningExecutorService executorService, in submitAndAddQueueListener() argument 828 final ListenableFuture<T> future = executorService.submit(task); in submitAndAddQueueListener()
|