/libcore/luni/src/main/java/java/util/concurrent/ |
Executor.java | 13 * use, scheduling, etc. An <tt>Executor</tt> is normally used 19 * Executor executor = <em>anExecutor</em>; 20 * executor.execute(new RunnableTask1()); 21 * executor.execute(new RunnableTask2()); 25 * However, the <tt>Executor</tt> interface does not strictly 27 * executor can run the submitted task immediately in the caller's 31 * class DirectExecutor implements Executor { 38 * than the caller's thread. The executor below spawns a new thread 42 * class ThreadPerTaskExecutor implements Executor { [all...] |
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...] |
/frameworks/support/volley/tests/src/com/android/volley/utils/ |
ImmediateResponseDelivery.java | 7 import java.util.concurrent.Executor; 16 super(new Executor() {
|
/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...] |
/external/guava/guava/src/com/google/common/util/concurrent/ |
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...] |
ForwardingListenableFuture.java | 21 import java.util.concurrent.Executor; 46 public void addListener(Runnable listener, Executor exec) {
|
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...] |
JdkFutureAdapters.java | 24 import java.util.concurrent.Executor; 68 Future<V> future, Executor executor) { 69 checkNotNull(executor); 73 return new ListenableFutureAdapter<V>(future, executor); 94 private static final Executor defaultAdapterExecutor = 97 private final Executor adapterExecutor; 113 ListenableFutureAdapter(Future<V> delegate, Executor adapterExecutor) { 124 public void addListener(Runnable listener, Executor exec) {
|
ListenableFutureTask.java | 20 import java.util.concurrent.Executor; 77 public void addListener(Runnable listener, Executor exec) {
|
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...] |
AbstractExecutionThreadService.java | 22 import java.util.concurrent.Executor; 43 executor().execute(new Runnable() { 112 * Returns the {@link Executor} that will be used to run this service. 113 * Subclasses may override this method to use a custom {@link Executor}, which 115 * priority. The returned executor's {@link Executor#execute(Runnable) 119 * <p>The default implementation returns a new {@link Executor} that sets the 122 protected Executor executor() { method in class:AbstractExecutionThreadService 123 return new Executor() { [all...] |
/external/chromium/net/proxy/ |
multi_threaded_proxy_resolver.h | 106 class Executor; 113 typedef std::vector<scoped_refptr<Executor> > ExecutorList; 124 Executor* FindIdleExecutor(); 127 Executor* AddNewExecutor(); 130 void OnExecutorReady(Executor* executor);
|
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/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() {
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/ |
MockExecutor.java | 20 import java.util.concurrent.Executor; 23 * A simple executor that maintains a queue and executes one task synchronously every 27 public class MockExecutor implements Executor {
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
AsyncTaskExecutor.java | 21 import java.util.concurrent.Executor; 26 * This interface has a direct parallel with the {@link Executor} interface. It exists to decouple 39 * Executes the given AsyncTask with the default Executor.
|
AsyncTaskExecutors.java | 25 import java.util.concurrent.Executor; 87 private final Executor mExecutor; 89 public SimpleAsyncTaskExecutor(Executor executor) { 90 mExecutor = executor;
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
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...] |
ExecutionListTest.java | 27 import java.util.concurrent.Executor; 40 protected Executor exec = Executors.newCachedThreadPool(); 87 tester.setDefault(Executor.class, sameThreadExecutor());
|
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...] |
/frameworks/support/volley/src/com/android/volley/ |
ExecutorDelivery.java | 21 import java.util.concurrent.Executor; 28 private final Executor mResponsePoster; 38 // Make an Executor that just wraps the handler. 39 mResponsePoster = new Executor() { 50 * @param executor For running delivery tasks 52 public ExecutorDelivery(Executor executor) { 53 mResponsePoster = executor;
|
/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...] |
/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);
|
/frameworks/base/core/java/android/os/ |
AsyncTask.java | 23 import java.util.concurrent.Executor; 43 * provided by the <code>java.util.concurrent</code> pacakge such as {@link Executor}, 174 * {@link #executeOnExecutor(java.util.concurrent.Executor, Object[])} with 196 * An {@link Executor} that can be used to execute tasks in parallel. 198 public static final Executor THREAD_POOL_EXECUTOR 203 * An {@link Executor} that executes tasks one at a time in serial 206 public static final Executor SERIAL_EXECUTOR = new SerialExecutor(); 213 private static volatile Executor sDefaultExecutor = SERIAL_EXECUTOR; 222 private static class SerialExecutor implements Executor { 273 public static void setDefaultExecutor(Executor exec) [all...] |
/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);
|