/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
PerNameExecutor.java | 23 * Uses a separate executor for each task name. 39 for (NamedTaskExecutor executor : mExecutors.values()) { 40 executor.cancelPendingTasks(); 46 for (NamedTaskExecutor executor : mExecutors.values()) { 47 executor.close(); 56 NamedTaskExecutor executor = mExecutors.get(name); local 57 if (executor == null) { 58 executor = mExecutorFactory.create(); 59 mExecutors.put(name, executor); 61 executor.execute(task) [all...] |
/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;
|
/libcore/luni/src/test/java/libcore/java/lang/ref/ |
ReferenceQueueTest.java | 93 ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1); local 94 executor.schedule(runnable, delayMillis, TimeUnit.MILLISECONDS); 95 executor.shutdown();
|
/external/guava/src/com/google/common/util/concurrent/ |
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...] |
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() {
|
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...] |
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...] |
/libcore/luni/src/main/java/java/util/concurrent/ |
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...] |
/libcore/luni/src/test/java/tests/security/ |
SecureRandomTest.java | 79 ExecutorService executor = Executors.newFixedThreadPool(threads); local 80 ExecutorCompletionService ecs = new ExecutorCompletionService(executor); 91 executor.shutdown();
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
TestSSLSocketPair.java | 79 ExecutorService executor = Executors.newFixedThreadPool(2); local 80 Future s = executor.submit(new Callable<Void>() { 89 Future c = executor.submit(new Callable<Void>() { 98 executor.shutdown();
|
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ |
OutputStreamTesterTest.java | 115 private ExecutorService executor; field in class:OutputStreamTesterTest.PipedOutputStreamSinkTester 122 executor = Executors.newSingleThreadExecutor(); 123 future = executor.submit(new Callable<byte[]>() { 139 executor.shutdown();
|
WriterTesterTest.java | 104 private ExecutorService executor; field in class:WriterTesterTest.PipedWriterCharSinkTester 111 executor = Executors.newSingleThreadExecutor(); 112 future = executor.submit(new Callable<char[]>() { 128 executor.shutdown();
|
/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();
|
/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);
|
/external/sqlite/android/ |
PhoneticStringUtilsTest.cpp | 211 TestExecutor executor; local 212 if(executor.DoAllTests()) {
|
/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();
|
/sdk/chimpchat/src/com/android/chimpchat/adb/ |
AdbChimpDevice.java | 65 private final ExecutorService executor = Executors.newSingleThreadExecutor(); field in class:AdbChimpDevice 90 executor.shutdown(); 101 executor.submit(new Runnable() {
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
SearchableCorpusFactory.java | 27 import java.util.concurrent.Executor; 42 private final Factory<Executor> mWebCorpusExecutorFactory; 45 Factory<Executor> webCorpusExecutorFactory) { 67 protected Executor createWebCorpusExecutor() { 119 Executor executor = createWebCorpusExecutor(); local 120 return new WebCorpus(mContext, mConfig, mSettings, executor, webSource, browserSource);
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
PackageIconLoaderTest.java | 54 NamedTaskExecutor executor = new SingleThreadNamedTaskExecutor( local 57 executor);
|
MultiSourceCorpusTest.java | 28 import java.util.concurrent.Executor; 45 Executor executor = Executors.newSingleThreadExecutor(); local 46 mCorpus = new SkeletonMultiSourceCorpus(getContext(), config, executor, 81 public SkeletonMultiSourceCorpus(Context context, Config config, Executor executor, 83 super(context, config, executor, sources);
|
/external/javassist/src/main/javassist/bytecode/analysis/ |
Analyzer.java | 138 Executor executor = new Executor(clazz.getClassPool(), method.getConstPool()); local 143 analyzeNextEntry(method, iter, queue, executor); 168 IntQueue queue, Executor executor) throws BadBytecode { 177 executor.execute(method, pos, iter, frame, subroutine);
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
CopyOnWriteArrayListTest.java | 179 ExecutorService executor = Executors.newSingleThreadExecutor(); local 180 Future<?> future = executor.submit(new Runnable() { 189 executor.shutdown();
|
/packages/providers/DownloadProvider/tests/src/tests/http/ |
MockWebServer.java | 60 private final ExecutorService executor = Executors.newCachedThreadPool(); field in class:MockWebServer 127 executor.shutdown(); 144 executor.shutdown(); 179 Future<?> future = executor.submit(callable);
|
/libcore/luni/src/test/java/libcore/java/net/ |
SocketTest.java | 252 private ExecutorService executor; field in class:SocketTest.MockServer 257 executor = Executors.newCachedThreadPool(); 265 return executor.submit(new Callable<byte[]>() { 285 executor.shutdown();
|