/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/ |
MockNamedTaskExecutorFactory.java | 30 * Runs one task in each executor. 33 for (MockNamedTaskExecutor executor : mExecutors) { 34 executor.runNext(); 39 MockNamedTaskExecutor executor = new MockNamedTaskExecutor(); local 40 mExecutors.add(executor); 41 return executor;
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
PerNameExecutor.java | 23 * Uses a separate executor for each task name. 38 for (NamedTaskExecutor executor : mExecutors.values()) { 39 executor.cancelPendingTasks(); 44 for (NamedTaskExecutor executor : mExecutors.values()) { 45 executor.close(); 54 NamedTaskExecutor executor = mExecutors.get(name); local 55 if (executor == null) { 56 executor = mExecutorFactory.create(); 57 mExecutors.put(name, executor); 59 executor.execute(task) [all...] |
BatchingNamedTaskExecutor.java | 42 * @param executor A SourceTaskExecutor for actually executing the tasks. 44 public BatchingNamedTaskExecutor(NamedTaskExecutor executor) { 45 mExecutor = executor; 61 * Instructs the executor to submit the next batch of results. 80 * Cancel any unstarted tasks running in this executor. This instance
|
/libcore/luni/src/main/java/java/util/concurrent/ |
RejectedExecutionHandler.java | 22 * shutdown of the Executor. 29 * @param executor the executor attempting to execute this task 32 void rejectedExecution(Runnable r, ThreadPoolExecutor executor);
|
ExecutorCompletionService.java | 10 * A {@link CompletionService} that uses a supplied {@link Executor} 27 * void solve(Executor e, 47 * void solve(Executor e, 79 private final Executor executor; field in class:ExecutorCompletionService 111 * executor for base task execution and a 114 * @param executor the executor to use 115 * @throws NullPointerException if executor is {@code null} 117 public ExecutorCompletionService(Executor executor) [all...] |
Executors.java | 21 * Factory and utility methods for {@link Executor}, {@link 94 * Creates an Executor that uses a single worker thread operating 101 * <tt>newFixedThreadPool(1)</tt> the returned executor is 104 * @return the newly created single-threaded Executor 114 * Creates an Executor that uses a single worker thread operating 118 * returned executor is guaranteed not to be reconfigurable to use 124 * @return the newly created single-threaded Executor 174 * Creates a single-threaded executor that can schedule commands 182 * <tt>newScheduledThreadPool(1)</tt> the returned executor is 184 * @return the newly created scheduled executor [all...] |
/external/guava/src/com/google/common/util/concurrent/ |
ExecutionList.java | 23 import java.util.concurrent.Executor; 28 * <p>A list of ({@code Runnable}, {@code Executor}) pairs that guarantees 30 * executed in its associated {@code Executor} after {@link #run()} is called. 44 // The list of runnable,executor pairs to execute. Only modified within 53 * Add the runnable/executor pair to the list of pairs to execute. Executes 56 public void add(Runnable runnable, Executor executor) { 59 // Executor states that it throws NPE on null listener, so we propagate 62 Preconditions.checkNotNull(executor, "Executor was null.") 108 final Executor executor; field in class:ExecutionList.RunnableExecutorPair [all...] |
Executors.java | 35 * Factory and utility methods for {@link java.util.concurrent.Executor}, {@link 53 * @param executor the executor to modify to make sure it exits when the 55 * @param terminationTimeout how long to wait for the executor to 61 ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { 62 executor.setThreadFactory(daemonThreadFactory(executor.getThreadFactory())); 65 .unconfigurableExecutorService(executor); 81 * @param executor the executor to modify to make sure it exits when th [all...] |
AbstractIdleService.java | 23 import java.util.concurrent.Executor; 30 * which run in a executor which by default uses a separate thread 41 executor(State.STARTING).execute(new Runnable() { 55 executor(State.STOPPING).execute(new Runnable() { 76 * Returns the {@link Executor} that will be used to run this service. 77 * Subclasses may override this method to use a custom {@link Executor}, which 79 * priority. The returned executor's {@link Executor#execute(Runnable) 86 protected Executor executor(final State state) method in class:AbstractIdleService [all...] |
SimpleTimeLimiter.java | 47 private final ExecutorService executor; field in class:SimpleTimeLimiter 50 * Constructs a TimeLimiter instance using the given executor service to 53 * <b>Warning:</b> using a bounded executor 59 * @param executor the ExecutorService that will execute the method calls on 63 public SimpleTimeLimiter(ExecutorService executor) { 64 checkNotNull(executor); 65 this.executor = executor; 73 * <p><b>Warning:</b> using a bounded executor may be counterproductive! If 120 Future<T> future = executor.submit(callable) [all...] |
AbstractExecutionThreadService.java | 22 import java.util.concurrent.Executor; 39 executor().execute(new Runnable() { 104 * Returns the {@link Executor} that will be used to run this service. 105 * Subclasses may override this method to use a custom {@link Executor}, which 107 * priority. The returned executor's {@link Executor#execute(Runnable) 111 protected Executor executor() { method in class:AbstractExecutionThreadService 112 return new Executor() {
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
TestSSLSocketPair.java | 67 ExecutorService executor = Executors.newFixedThreadPool(2); local 68 Future s = executor.submit(new Callable<Void>() { 77 Future c = executor.submit(new Callable<Void>() { 86 executor.shutdown();
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
MultiSourceCorpusTest.java | 28 import java.util.concurrent.Executor; 45 Executor executor = Executors.newSingleThreadExecutor(); local 46 mCorpus = new SkeletonMultiSourceCorpus(getContext(), config, executor, 77 public SkeletonMultiSourceCorpus(Context context, Config config, Executor executor, 79 super(context, config, executor, sources);
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
DeflaterOutputStreamTest.java | 69 ExecutorService executor = Executors.newSingleThreadExecutor(); local 73 executor.submit(new Callable<Void>() { 83 executor.shutdown();
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
QueryTask.java | 85 NamedTaskExecutor executor, Handler handler, 91 executor.execute(task);
|
SearchableCorpusFactory.java | 27 import java.util.concurrent.Executor; 40 private final Factory<Executor> mWebCorpusExecutorFactory; 43 Factory<Executor> webCorpusExecutorFactory) { 64 protected Executor createWebCorpusExecutor() { 116 Executor executor = createWebCorpusExecutor(); local 117 return new WebCorpus(mContext, mConfig, executor, webSource, browserSource);
|
SourceShortcutRefresher.java | 41 * Create a ShortcutRefresher that will refresh shortcuts using the given executor. 43 * @param executor Used to execute the tasks. 45 public SourceShortcutRefresher(NamedTaskExecutor executor) { 46 mExecutor = executor;
|
MultiSourceCorpus.java | 27 import java.util.concurrent.Executor; 34 private final Executor mExecutor; 46 Executor executor, Source... sources) { 48 mExecutor = executor;
|
WebCorpus.java | 32 import java.util.concurrent.Executor; 45 public WebCorpus(Context context, Config config, Executor executor, 47 super(context, config, executor, webSearchSource, browserSource);
|
/external/sqlite/android/ |
PhoneticStringUtilsTest.cpp | 211 TestExecutor executor; local 212 if(executor.DoAllTests()) {
|
/libcore/luni/src/test/java/tests/api/java/util/concurrent/ |
SynchronousQueueTest.java | 560 * offer transfers elements across Executor tasks 564 ExecutorService executor = Executors.newFixedThreadPool(2); local 566 executor.execute(new CheckedRunnable() { 573 executor.execute(new CheckedRunnable() { 579 joinPool(executor); 583 * poll retrieves elements across Executor threads 587 ExecutorService executor = Executors.newFixedThreadPool(2); local 588 executor.execute(new CheckedRunnable() { 595 executor.execute(new CheckedRunnable() { 601 joinPool(executor); [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audioquality/experiments/ |
ColdLatencyExperiment.java | 77 ExecutorService executor = Executors.newCachedThreadPool(); local 82 Future<Long> recordingFuture = executor.submit(recordingTask); 115 executor.shutdown();
|
WarmLatencyExperiment.java | 77 ExecutorService executor = Executors.newFixedThreadPool(2); local 82 Future<Long> playbackTimeFuture = executor.submit(playbackTask); 83 Future<Long> recordTimeFuture = executor.submit(recordingTask);
|
/cts/libs/vogar-expect/src/vogar/commands/ |
Command.java | 188 ExecutorService executor = Threads.fixedThreadsExecutor("command", 1); local 189 Future<List<String>> result = executor.submit(new Callable<List<String>>() { 195 executor.shutdown();
|
/packages/providers/DownloadProvider/tests/src/tests/http/ |
MockWebServer.java | 57 private final ExecutorService executor = Executors.newCachedThreadPool(); field in class:MockWebServer 123 executor.shutdown(); 167 Future<?> future = executor.submit(callable);
|