Searched refs:executor (Results 1 - 25 of 44) sorted by relevance

12

/external/guava/guava/src/com/google/common/eventbus/
H A DAsyncEventBus.java32 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) { argument
49 this.executor = executor;
53 * Creates a new AsyncEventBus that will use {@code executor} to dispatch
56 * @param executor Executor to use to dispatch events. It is the caller's
57 * responsibility to shut down the executor afte
60 AsyncEventBus(Executor executor) argument
[all...]
/external/guava/guava/src/com/google/common/util/concurrent/
H A DExecutionList.java35 * <p>Exceptions thrown by a listener will be propagated up to the executor.
51 // The runnable,executor pairs to execute.
80 public void add(Runnable runnable, Executor executor) { argument
85 Preconditions.checkNotNull(executor, "Executor was null.");
94 runnables.add(new RunnableExecutorPair(runnable, executor));
105 new RunnableExecutorPair(runnable, executor).execute();
140 final Executor executor; field in class:ExecutionList.RunnableExecutorPair
142 RunnableExecutorPair(Runnable runnable, Executor executor) { argument
144 this.executor = executor;
[all...]
H A DAbstractScheduledService.java39 * <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, argument
186 executorService = executor();
253 * {@link #runOneIteration} and {@link #shutDown} methods. The executor will not be
260 protected ScheduledExecutorService executor() { method in class:AbstractScheduledService
314 private final ScheduledExecutorService executor; field in class:AbstractScheduledService.CustomScheduler.ReschedulableCallable
333 ReschedulableCallable(AbstractService service, ScheduledExecutorService executor, Runnable runnable) argument
393 schedule(AbstractService service, ScheduledExecutorService executor, Runnable runnable) argument
[all...]
H A DListenableFuture.java27 * associated executor, and it is invoked using this executor once the future's
54 * }, executor);}</pre>
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.
117 * @param executor the executor to run the listener in
118 * @throws NullPointerException if the executor or listener was null
120 * immediately but the executor rejected it.
122 void addListener(Runnable listener, Executor executor); argument
[all...]
H A DAbstractIdleService.java28 * 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() {
78 * priority. The returned executor's {@link Executor#execute(Runnable)
86 protected Executor executor(final State state) { method in class:AbstractIdleService
H A DMoreExecutors.java60 * @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 the
93 * @param terminationTimeout how long to wait for the executor t
68 getExitingExecutorService( ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) argument
99 getExitingScheduledExecutorService( ScheduledThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) argument
164 getExitingExecutorService( ThreadPoolExecutor executor) argument
185 getExitingScheduledExecutorService( ScheduledThreadPoolExecutor executor) argument
[all...]
H A DSimpleTimeLimiter.java50 private final ExecutorService executor; field in class:SimpleTimeLimiter
53 * Constructs a TimeLimiter instance using the given executor service to
56 * <b>Warning:</b> using a bounded executor
62 * @param executor the ExecutorService that will execute the method calls on
66 public SimpleTimeLimiter(ExecutorService executor) { argument
67 this.executor = checkNotNull(executor);
74 * <p><b>Warning:</b> using a bounded executor may be counterproductive! If
126 Future<T> future = executor.submit(callable);
H A DJdkFutureAdapters.java68 Future<V> future, Executor executor) {
69 checkNotNull(executor);
73 return new ListenableFutureAdapter<V>(future, executor);
67 listenInPoolThread( Future<V> future, Executor executor) argument
H A DAbstractExecutionThreadService.java43 executor().execute(new Runnable() {
115 * priority. The returned executor's {@link Executor#execute(Runnable)
122 protected Executor executor() { method in class:AbstractExecutionThreadService
/external/guava/guava-tests/test/com/google/common/util/concurrent/
H A DMoreExecutorsTest.java49 final ListeningExecutorService executor =
72 Future<?> future = executor.submit(incrementTask);
83 ListenableFuture<?> future = executor.submit(incrementTask);
96 final ExecutorService executor = MoreExecutors.sameThreadExecutor();
114 executor.invokeAll(Collections.nCopies(10, incrementTask));
127 final ExecutorService executor = MoreExecutors.sameThreadExecutor();
139 Future<?> future = executor.submit(new Callable<Void>() {
147 assertTrue(executor.isShutdown());
148 assertFalse(executor.isTerminated());
156 assertTrue(executor
[all...]
H A DAbstractIdleServiceTest.java36 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) {
113 @Override protected Executor executor(Service.State state) { method in class:AbstractIdleServiceTest.NullService
117 return executor;
121 return executor;
H A DAbstractExecutionThreadServiceTest.java43 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
242 return executor;
273 @Override protected Executor executor() { method in class:AbstractExecutionThreadServiceTest.ThrowOnShutDown
274 return executor;
290 @Override protected Executor executor() { method in class:AbstractExecutionThreadServiceTest.TimeoutOnStartUp
[all...]
H A DAbstractFutureTest.java94 ExecutorService executor = Executors.newFixedThreadPool(10);
98 executor.execute(new Runnable() {
107 executor.execute(new Runnable() {
116 executor.execute(new Runnable() {
133 executor.shutdown();
H A DAbstractScheduledServiceTest.java51 final ScheduledExecutorService executor = new ScheduledThreadPoolExecutor(10) { field in class:AbstractScheduledServiceTest
72 @Override protected ScheduledExecutorService executor() { return executor; } method in class:AbstractScheduledServiceTest.NullService
219 protected ScheduledExecutorService executor() { method in class:AbstractScheduledServiceTest.TestService
221 return executor;
367 @Override protected ScheduledExecutorService executor() { method in class:AbstractScheduledServiceTest.SchedulerTest.TestAbstractScheduledCustomService
413 @Override protected ScheduledExecutorService executor() { method in class:AbstractScheduledServiceTest.SchedulerTest.TestFailingCustomScheduledService
/external/guava/guava/src/com/google/common/cache/
H A DRemovalListeners.java36 * 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() {
42 asynchronous( final RemovalListener<K, V> listener, final Executor executor) argument
/external/chromium/net/proxy/
H A Dmulti_threaded_proxy_resolver.cc36 // An "executor" is a job-runner for PAC requests. It encapsulates a worker
43 // signal when the executor is ready to receive work by calling
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
77 // The currently active job for this executor (either a SetPacScript or
110 void set_executor(Executor* executor) { argument
111 executor_ = executor;
114 // The "executor" is the job runner that is scheduling this job. If
115 // this job has not been submitted to an executor ye
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
558 OnExecutorReady(Executor* executor) argument
[all...]
H A Dmulti_threaded_proxy_resolver.h130 void OnExecutorReady(Executor* executor);
/external/guava/guava-tests/test/com/google/common/eventbus/
H A DAsyncEventBusTest.java32 /** The executor we use to fake asynchronicity. */
33 private FakeExecutor executor; field in class:AsyncEventBusTest
38 executor = new FakeExecutor();
39 bus = new AsyncEventBus(executor);
54 List<Runnable> tasks = executor.getTasks();
/external/jmonkeyengine/engine/src/bullet-common/com/jme3/bullet/
H A DBulletAppState.java26 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
[all...]
/external/jmdns/src/javax/jmdns/impl/
H A DJmmDNSImpl.java88 ExecutorService executor = Executors.newCachedThreadPool();
90 executor.submit(new Runnable() {
104 executor.shutdown();
106 executor.awaitTermination(DNSConstants.CLOSE_TIMEOUT, TimeUnit.MILLISECONDS);
201 ExecutorService executor = Executors.newCachedThreadPool();
203 executor.submit(new Runnable() {
213 executor.shutdown();
215 executor.awaitTermination(timeout, TimeUnit.MILLISECONDS);
404 ExecutorService executor = Executors.newCachedThreadPool();
406 executor
[all...]
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/
H A DOutputStreamTesterTest.java115 private ExecutorService executor; field in class:OutputStreamTesterTest.PipedOutputStreamSinkTester
122 executor = Executors.newSingleThreadExecutor();
123 future = executor.submit(new Callable<byte[]>() {
139 executor.shutdown();
H A DWriterTesterTest.java104 private ExecutorService executor; field in class:WriterTesterTest.PipedWriterCharSinkTester
111 executor = Executors.newSingleThreadExecutor();
112 future = executor.submit(new Callable<char[]>() {
128 executor.shutdown();
/external/jmonkeyengine/engine/src/core/com/jme3/asset/
H A DThreadingManager.java48 protected final ExecutorService executor = field in class:ThreadingManager
91 // return executor.submit(new MultiLoadingTask(names));
95 // return executor.submit(new LoadingTask(name));
/external/smack/src/org/jivesoftware/smackx/bytestreams/socks5/
H A DSocks5Client.java96 Thread executor = new Thread(futureTask);
97 executor.start();
/external/antlr/antlr-3.4/gunit-maven-plugin/src/main/java/org/antlr/mojo/antlr3/
H A DGUnitExecuteMojo.java299 gUnitExecutor executor = new gUnitExecutor(
305 String report = executor.execTest();
309 testResult.tests = executor.numOfTest;
310 testResult.failures = executor.numOfFailure;
311 testResult.invalids = executor.numOfInvalidInput;
316 for ( AbstractTest test : executor.failures ) {

Completed in 522 milliseconds

12