/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. 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...] |
/external/guava/guava/src/com/google/common/eventbus/ |
AsyncEventBus.java | 21 import java.util.concurrent.Executor; 24 * An {@link EventBus} that takes the Executor of your choice and uses it to 32 private final Executor executor; field in class:AsyncEventBus 39 * Creates a new AsyncEventBus that will use {@code executor} to dispatch 43 * @param executor Executor to use to dispatch events. It is the caller's 44 * responsibility to shut down the executor after the last event has 47 public AsyncEventBus(String identifier, Executor executor) { [all...] |
/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 | 20 * Factory and utility methods for {@link Executor}, {@link 93 * Creates an Executor that uses a single worker thread operating 100 * <tt>newFixedThreadPool(1)</tt> the returned executor is 103 * @return the newly created single-threaded Executor 113 * Creates an Executor that uses a single worker thread operating 117 * returned executor is guaranteed not to be reconfigurable to use 123 * @return the newly created single-threaded Executor 173 * Creates a single-threaded executor that can schedule commands 181 * <tt>newScheduledThreadPool(1)</tt> the returned executor is 183 * @return the newly created scheduled executor [all...] |
/external/guava/guava/src/com/google/common/util/concurrent/ |
ExecutionList.java | 23 import java.util.concurrent.Executor; 28 * <p>A list of listeners, each with an associated {@code Executor}, that 35 * <p>Exceptions thrown by a listener will be propagated up to the executor. 36 * Any exception thrown during {@code Executor.execute} (e.g., a {@code 51 // The runnable,executor pairs to execute. 63 * Adds the {@code Runnable} and accompanying {@code Executor} to the list of 80 public void add(Runnable runnable, Executor executor) { 82 // Executor states that it throws NPE on null listener, so we propagate 85 Preconditions.checkNotNull(executor, "Executor was null.") 140 final Executor executor; field in class:ExecutionList.RunnableExecutorPair [all...] |
AbstractScheduledService.java | 39 * <p>This class uses the {@link ScheduledExecutorService} returned from {@link #executor} to run 120 public Future<?> schedule(AbstractService service, ScheduledExecutorService executor, 122 return executor.scheduleWithFixedDelay(task, initialDelay, delay, unit); 139 public Future<?> schedule(AbstractService service, ScheduledExecutorService executor, 141 return executor.scheduleAtFixedRate(task, initialDelay, period, unit); 146 /** Schedules the task to run on the provided executor on behalf of the service. */ 147 abstract Future<?> schedule(AbstractService service, ScheduledExecutorService executor, 186 executorService = executor(); 253 * {@link #runOneIteration} and {@link #shutDown} methods. The executor will not be 260 protected ScheduledExecutorService executor() { [all...] |
ListenableFuture.java | 19 import java.util.concurrent.Executor; 27 * associated executor, and it is invoked using this executor once the future's 54 * }, executor);}</pre> 84 * Registers a listener to be {@linkplain Executor#execute(Runnable) run} on 85 * the given executor. The listener will run when the {@code Future}'s 93 * <p>Exceptions thrown by a listener will be propagated up to the executor. 94 * Any exception thrown during {@code Executor.execute} (e.g., a {@code 117 * @param executor the executor to run the listener i [all...] |
AbstractIdleService.java | 22 import java.util.concurrent.Executor; 28 * which run in a executor which by default uses a separate thread 40 executor(State.STARTING).execute(new Runnable() { 54 executor(State.STOPPING).execute(new Runnable() { 75 * Returns the {@link Executor} that will be used to run this service. 76 * Subclasses may override this method to use a custom {@link Executor}, which 78 * priority. The returned executor's {@link Executor#execute(Runnable) 86 protected Executor executor(final State state) method in class:AbstractIdleService [all...] |
MoreExecutors.java | 41 * Factory and utility methods for {@link java.util.concurrent.Executor}, {@link 60 * @param executor the executor to modify to make sure it exits when the 62 * @param terminationTimeout how long to wait for the executor to 69 ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { 70 executor.setThreadFactory(new ThreadFactoryBuilder() 72 .setThreadFactory(executor.getThreadFactory()) 75 ExecutorService service = Executors.unconfigurableExecutorService(executor); 91 * @param executor the executor to modify to make sure it exits when th [all...] |
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
MoreExecutorsTest.java | 49 final ListeningExecutorService executor = local 72 Future<?> future = executor.submit(incrementTask); 83 ListenableFuture<?> future = executor.submit(incrementTask); 96 final ExecutorService executor = MoreExecutors.sameThreadExecutor(); local 114 executor.invokeAll(Collections.nCopies(10, incrementTask)); 127 final ExecutorService executor = MoreExecutors.sameThreadExecutor(); local 139 Future<?> future = executor.submit(new Callable<Void>() { 147 assertTrue(executor.isShutdown()); 148 assertFalse(executor.isTerminated()); 156 assertTrue(executor.isShutdown()) [all...] |
AbstractIdleServiceTest.java | 24 import java.util.concurrent.Executor; 36 private final Executor executor = new Executor() { field in class:AbstractIdleServiceTest 76 // Create a service whose executor will never run its commands 78 @Override protected Executor executor(Service.State state) { 79 return new Executor() { 113 @Override protected Executor executor(Service.State state) method in class:AbstractIdleServiceTest.NullService [all...] |
AbstractExecutionThreadServiceTest.java | 26 import java.util.concurrent.Executor; 43 private final Executor executor = new Executor() { field in class:AbstractExecutionThreadServiceTest 163 @Override protected Executor executor() { method in class:AbstractExecutionThreadServiceTest.WaitOnRunService 164 return executor; 198 @Override protected Executor executor() { method in class:AbstractExecutionThreadServiceTest.ThrowOnStartUpService 199 return executor; 241 @Override protected Executor executor() { method in class:AbstractExecutionThreadServiceTest.ThrowOnRunService 273 @Override protected Executor executor() { method in class:AbstractExecutionThreadServiceTest.ThrowOnShutDown 290 @Override protected Executor executor() { method in class:AbstractExecutionThreadServiceTest.TimeoutOnStartUp [all...] |
/external/guava/guava/src/com/google/common/cache/ |
RemovalListeners.java | 21 import java.util.concurrent.Executor; 36 * notifications using {@code executor}. 39 * @param executor the executor with which removal notifications are 43 final RemovalListener<K, V> listener, final Executor executor) { 47 executor.execute(new Runnable() {
|
/external/chromium/net/proxy/ |
multi_threaded_proxy_resolver.cc | 36 // An "executor" is a job-runner for PAC requests. It encapsulates a worker 39 class MultiThreadedProxyResolver::Executor 40 : public base::RefCountedThreadSafe<MultiThreadedProxyResolver::Executor > { 43 // signal when the executor is ready to receive work by calling 47 Executor(MultiThreadedProxyResolver* coordinator, 51 // Submit a job to this executor. 54 // Callback for when a job has completed running on the executor's thread. 57 // Cleanup the executor. Cancels all outstanding work, and frees the thread 71 friend class base::RefCountedThreadSafe<Executor>; 72 ~Executor(); 117 Executor* executor() { function in class:net::MultiThreadedProxyResolver::Job 416 Executor* executor = FindIdleExecutor(); local 477 Executor* executor = *it; local 500 Executor* executor = AddNewExecutor(); local 511 const Executor* executor = *it; local 527 Executor* executor = *it; local 538 Executor* executor = *it; local 552 Executor* executor = new Executor( local [all...] |
/external/guava/guava-tests/test/com/google/common/eventbus/ |
AsyncEventBusTest.java | 21 import java.util.concurrent.Executor; 32 /** The executor we use to fake asynchronicity. */ 33 private FakeExecutor executor; field in class:AsyncEventBusTest 38 executor = new FakeExecutor(); 39 bus = new AsyncEventBus(executor); 46 // We post the event, but our Executor will not deliver it until instructed. 53 // Now we find the task in our Executor and explicitly activate it. 54 List<Runnable> tasks = executor.getTasks(); 64 * An {@link Executor} wanna-be that simply records the tasks it's given. 65 * Arguably the Worst Executor Ever [all...] |
/external/okhttp/src/main/java/libcore/net/spdy/ |
SpdyConnection.java | 28 import java.util.concurrent.Executor; 62 private final Executor executor; field in class:SpdyConnection 80 executor = builder.executor != null 81 ? builder.executor 83 executor.execute(new Reader()); 148 executor.execute(new Runnable() { 173 if (executor instanceof ExecutorService) { 174 ((ExecutorService) executor).shutdown() 182 private Executor executor; field in class:SpdyConnection.Builder 203 public Builder executor(Executor executor) { method in class:SpdyConnection.Builder [all...] |
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
QueryTask.java | 80 NamedTaskExecutor executor, Handler handler, 85 executor, handler, consumer, onlyOneProvider); 92 NamedTaskExecutor executor, Handler handler, 97 executor.execute(task);
|
/external/jmonkeyengine/engine/src/bullet-common/com/jme3/bullet/ |
BulletAppState.java | 26 protected ScheduledThreadPoolExecutor executor; field in class:BulletAppState 71 if (executor != null) { 72 executor.shutdown(); 74 executor = new ScheduledThreadPoolExecutor(1); 86 return executor.submit(call).get(); 110 executor.schedule(detachedPhysicsUpdate, Math.round(getPhysicsSpace().getAccuracy() * 1000000.0f) - (update * 1000), TimeUnit.MICROSECONDS); 129 // executor.submit(detachedPhysicsUpdate); 183 physicsFuture = executor.submit(parallelPhysicsUpdate); 204 if (executor != null) { 205 executor.shutdown() [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();
|
/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, 81 public SkeletonMultiSourceCorpus(Context context, Config config, Executor executor, 83 super(context, config, executor, sources);
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
SSLSocketTest.java | 279 ExecutorService executor = Executors.newSingleThreadExecutor(); local 280 Future<Void> future = executor.submit(new Callable<Void>() { 300 executor.shutdown(); 325 ExecutorService executor = Executors.newSingleThreadExecutor(); local 326 Future<Void> future = executor.submit(new Callable<Void>() { 336 executor.shutdown(); 362 ExecutorService executor = Executors.newSingleThreadExecutor(); local 363 Future<Void> future = executor.submit(new Callable<Void>() { 369 executor.shutdown(); 382 ExecutorService executor = Executors.newSingleThreadExecutor() local 487 ExecutorService executor = Executors.newSingleThreadExecutor(); local 550 ExecutorService executor = Executors.newSingleThreadExecutor(); local 604 ExecutorService executor = Executors.newSingleThreadExecutor(); local 634 ExecutorService executor = Executors.newSingleThreadExecutor(); local 706 ExecutorService executor = Executors.newSingleThreadExecutor(); local 750 ExecutorService executor = Executors.newSingleThreadExecutor(); local 779 ExecutorService executor = Executors.newSingleThreadExecutor(); local 981 ExecutorService executor = Executors.newSingleThreadExecutor(); local 1064 ExecutorService executor = Executors.newSingleThreadExecutor(); local 1135 ExecutorService executor = Executors.newSingleThreadExecutor(); local 1168 ExecutorService executor = Executors.newSingleThreadExecutor(); local [all...] |
/frameworks/support/volley/src/com/android/volley/ |
ExecutorDelivery.java | 21 import java.util.concurrent.Executor; 28 private final Executor mResponsePoster; 35 // Make an Executor that just wraps the handler. 36 mResponsePoster = new Executor() { 47 * @param executor For running delivery tasks 49 public ExecutorDelivery(Executor executor) { 50 mResponsePoster = executor;
|