/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/chromium_org/chrome/test/pyautolib/chromeos/ |
file_browser.py | 13 executor = pyauto.PyUITest.JavascriptExecutorInTab(self) 14 file_browser = chromeos.file_browser.FileBrowser(self, executor) 22 def __init__(self, ui_test, executor): 27 executor: derived from pyauto.PyUITest.JavascriptExecutor. 30 self.executor = executor 44 return self.executor.Execute(script) 55 list = json.loads(self.executor.Execute(script)) 67 self.executor.Execute(script) 74 self.executor.Execute(script [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 131 * Creates an Executor that uses a single worker thread operating 138 * {@code newFixedThreadPool(1)} the returned executor is 141 * @return the newly created single-threaded Executor 151 * Creates an Executor that uses a single worker thread operating 155 * returned executor is guaranteed not to be reconfigurable to use 161 * @return the newly created single-threaded Executor 211 * Creates a single-threaded executor that can schedule commands 219 * {@code newScheduledThreadPool(1)} the returned executor is 221 * @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...] |
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/ |
ProviderExecutor.java | 24 import java.util.concurrent.Executor; 27 public class ProviderExecutor extends Thread implements Executor { 32 public static Executor forAuthority(String authority) { 34 ProviderExecutor executor = sExecutors.get(authority); local 35 if (executor == null) { 36 executor = new ProviderExecutor(); 37 executor.setName("ProviderExecutor: " + authority); 38 executor.start(); 39 sExecutors.put(authority, executor); 41 return executor; [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...] |
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/ |
PrioritizedSerialExecutorTests.java | 37 final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(); local 40 executor.execute(new Runnable() { 57 final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(); local 60 executor.executePrioritized(new Runnable() { 77 final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(); local 80 executor.execute(new Runnable() { 89 executor.executePrioritized(new Runnable() {
|
/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/chromium_org/net/proxy/ |
multi_threaded_proxy_resolver.cc | 25 // An "executor" is a job-runner for PAC requests. It encapsulates a worker 28 class MultiThreadedProxyResolver::Executor 29 : public base::RefCountedThreadSafe<MultiThreadedProxyResolver::Executor > { 32 // signal when the executor is ready to receive work by calling 36 Executor(MultiThreadedProxyResolver* coordinator, 40 // Submit a job to this executor. 43 // Callback for when a job has completed running on the executor's thread. 46 // Cleanup the executor. Cancels all outstanding work, and frees the thread 60 friend class base::RefCountedThreadSafe<Executor>; 61 ~Executor(); 106 Executor* executor() { function in class:net::MultiThreadedProxyResolver::Job 423 Executor* executor = FindIdleExecutor(); local 490 Executor* executor = it->get(); local 513 Executor* executor = AddNewExecutor(); local 524 const Executor* executor = it->get(); local 540 Executor* executor = it->get(); local 551 Executor* executor = it->get(); local 565 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/chromium_org/tools/gyp/pylib/gyp/ |
sun_tool.py | 17 executor = SunTool() 18 executor.Dispatch(args)
|
/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();
|