/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
|
/dalvik/libcore/concurrent/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 105 * executor for base task execution and a 108 * @param executor the executor to use 109 * @throws NullPointerException if executor is {@code null} 111 public ExecutorCompletionService(Executor executor) [all...] |
Executors.java | 18 * Factory and utility methods for {@link Executor}, {@link 91 * Creates an Executor that uses a single worker thread operating 98 * <tt>newFixedThreadPool(1)</tt> the returned executor is 101 * @return the newly created single-threaded Executor 111 * Creates an Executor that uses a single worker thread operating 115 * returned executor is guaranteed not to be reconfigurable to use 121 * @return the newly created single-threaded Executor 171 * Creates a single-threaded executor that can schedule commands 179 * <tt>newScheduledThreadPool(1)</tt> the returned executor is 181 * @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() {
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
MultiSourceCorpusTest.java | 29 import java.util.concurrent.Executor; 45 Executor executor = Executors.newSingleThreadExecutor(); local 46 mCorpus = new SkeletonMultiSourceCorpus(getContext(), executor, 77 public SkeletonMultiSourceCorpus(Context context, Executor executor, Source... sources) { 78 super(context, executor, sources);
|
/dalvik/libcore/archive/src/test/java/java/util/zip/ |
DeflaterOutputStreamTest.java | 61 ExecutorService executor = Executors.newSingleThreadExecutor(); local 65 executor.submit(new Callable<Void>() { 75 executor.shutdown();
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
QueryTask.java | 82 NamedTaskExecutor executor, Handler handler, 88 executor.execute(task);
|
MultiSourceCorpus.java | 27 import java.util.concurrent.Executor; 36 private final Executor mExecutor; 40 public MultiSourceCorpus(Context context, Executor executor, Source... sources) { 42 mExecutor = executor;
|
SearchableCorpusFactory.java | 26 import java.util.concurrent.Executor; 35 private final Factory<Executor> mWebCorpusExecutorFactory; 37 public SearchableCorpusFactory(Context context, Factory<Executor> webCorpusExecutorFactory) { 53 protected Executor createWebCorpusExecutor() { 93 Executor executor = createWebCorpusExecutor(); local 94 return new WebCorpus(mContext, executor, webSource, browserSource);
|
SourceShortcutRefresher.java | 36 * Create a ShortcutRefresher that will refresh shortcuts using the given executor. 38 * @param executor Used to execute the tasks. 40 public SourceShortcutRefresher(NamedTaskExecutor executor) { 41 mExecutor = executor;
|
SuggestionsProviderImpl.java | 178 public SuggestionCursorReceiver(BatchingNamedTaskExecutor executor, 180 mExecutor = executor;
|
WebCorpus.java | 34 import java.util.concurrent.Executor; 47 public WebCorpus(Context context, Executor executor, 49 super(context, executor, webSearchSource, browserSource);
|
/external/sqlite/android/ |
PhoneticStringUtilsTest.cpp | 211 TestExecutor executor; local 212 if(executor.DoAllTests()) {
|
/dalvik/libcore/concurrent/src/test/java/tests/api/java/util/concurrent/ |
SynchronousQueueTest.java | 672 * offer transfers elements across Executor tasks 676 ExecutorService executor = Executors.newFixedThreadPool(2); local 679 executor.execute(new Runnable() { 692 executor.execute(new Runnable() { 704 joinPool(executor); 709 * poll retrieves elements across Executor threads 713 ExecutorService executor = Executors.newFixedThreadPool(2); local 714 executor.execute(new Runnable() { 727 executor.execute(new Runnable() { 739 joinPool(executor); [all...] |
ArrayBlockingQueueTest.java | 847 * offer transfers elements across Executor tasks 853 ExecutorService executor = Executors.newFixedThreadPool(2); local 854 executor.execute(new Runnable() { 867 executor.execute(new Runnable() { 879 joinPool(executor); 884 * poll retrieves elements across Executor threads 888 ExecutorService executor = Executors.newFixedThreadPool(2); local 889 executor.execute(new Runnable() { 902 executor.execute(new Runnable() { 914 joinPool(executor); [all...] |
LinkedBlockingQueueTest.java | 852 * offer transfers elements across Executor tasks 858 ExecutorService executor = Executors.newFixedThreadPool(2); local 859 executor.execute(new Runnable() { 872 executor.execute(new Runnable() { 884 joinPool(executor); 888 * poll retrieves elements across Executor threads 892 ExecutorService executor = Executors.newFixedThreadPool(2); local 893 executor.execute(new Runnable() { 906 executor.execute(new Runnable() { 918 joinPool(executor); [all...] |
ExecutorsTest.java | 294 ExecutorService executor = Executors.newSingleThreadExecutor(); local 301 tasks.add(new TimedCallable<BigInteger>(executor, new Fib(i), 1)); 325 joinPool(executor);
|
DelayQueueTest.java | 827 * offer transfers elements across Executor tasks 831 ExecutorService executor = Executors.newFixedThreadPool(2); local 832 executor.execute(new Runnable() { 845 executor.execute(new Runnable() { 856 joinPool(executor);
|