Home
last modified time | relevance | path

Searched full:executor (Results 1 – 25 of 2041) sorted by relevance

12345678910>>...82

/external/guava/android/guava-tests/benchmark/com/google/common/util/concurrent/
DExecutionListBenchmark.java34 import java.util.concurrent.Executor;
50 void add(Runnable runnable, Executor executor); in add() argument
65 public void add(Runnable runnable, Executor executor) { in newExecutionList() argument
66 list.add(runnable, executor); in newExecutionList()
88 public void add(Runnable runnable, Executor executor) { in newExecutionList() argument
89 list.add(runnable, executor); in newExecutionList()
111 public void add(Runnable runnable, Executor executor) { in newExecutionList() argument
112 list.add(runnable, executor); in newExecutionList()
134 public void add(Runnable runnable, Executor executor) {
135 list.add(runnable, executor);
[all …]
DMoreExecutorsDirectExecutorBenchmark.java30 import java.util.concurrent.Executor;
42 Executor executor() { in executor() method
46 EXECUTOR { enumConstant
48 Executor executor() { in executor() method
53 abstract Executor executor(); in executor() method in MoreExecutorsDirectExecutorBenchmark.Impl
57 Executor executor; field in MoreExecutorsDirectExecutorBenchmark
74 executor = impl.executor(); in before()
82 executor.execute(localRunnable); in before()
101 return executor; in measureSize()
106 final Executor executor = this.executor; in timeUncontendedExecute() local
[all …]
/external/guava/guava-tests/benchmark/com/google/common/util/concurrent/
DExecutionListBenchmark.java34 import java.util.concurrent.Executor;
50 void add(Runnable runnable, Executor executor); in add() argument
65 public void add(Runnable runnable, Executor executor) { in newExecutionList() argument
66 list.add(runnable, executor); in newExecutionList()
88 public void add(Runnable runnable, Executor executor) { in newExecutionList() argument
89 list.add(runnable, executor); in newExecutionList()
111 public void add(Runnable runnable, Executor executor) { in newExecutionList() argument
112 list.add(runnable, executor); in newExecutionList()
134 public void add(Runnable runnable, Executor executor) {
135 list.add(runnable, executor);
[all …]
DMoreExecutorsDirectExecutorBenchmark.java30 import java.util.concurrent.Executor;
42 Executor executor() { in executor() method
46 EXECUTOR { enumConstant
48 Executor executor() { in executor() method
53 abstract Executor executor(); in executor() method in MoreExecutorsDirectExecutorBenchmark.Impl
57 Executor executor; field in MoreExecutorsDirectExecutorBenchmark
74 executor = impl.executor(); in before()
82 executor.execute(localRunnable); in before()
101 return executor; in measureSize()
106 final Executor executor = this.executor; in timeUncontendedExecute() local
[all …]
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DSerializingExecutorTest.java29 import java.util.concurrent.Executor;
37 private SerializingExecutor executor = new SerializingExecutor(singleExecutor); field in SerializingExecutorTest
55 class CoyExecutor implements Executor { in resumable()
68 executor = new SerializingExecutor(new CoyExecutor()); in resumable()
70 executor.execute(new AddToRuns(1)); in resumable()
76 executor.execute(new AddToRuns(2)); in resumable()
84 executor.execute(new AddToRuns(1)); in serial()
89 executor.execute(new AddToRuns(2)); in serial()
97 executor.execute(new AddToRuns(1)); in parallel()
98 executor.execute(new AddToRuns(2)); in parallel()
[all …]
DConnectivityStateManagerTest.java29 import java.util.concurrent.Executor;
44 private final FakeClock executor = new FakeClock(); field in ConnectivityStateManagerTest
66 }, executor.getScheduledExecutorService(), CONNECTING); in registerCallbackBeforeStateChanged()
68 assertEquals(0, executor.numPendingTasks()); in registerCallbackBeforeStateChanged()
70 // Make sure the callback is run in the executor in registerCallbackBeforeStateChanged()
72 assertEquals(1, executor.runDueTasks()); in registerCallbackBeforeStateChanged()
73 assertEquals(0, executor.numPendingTasks()); in registerCallbackBeforeStateChanged()
88 }, executor.getScheduledExecutorService(), IDLE); in registerCallbackAfterStateChanged()
90 // Make sure the callback is run in the executor in registerCallbackAfterStateChanged()
92 assertEquals(1, executor.runDueTasks()); in registerCallbackAfterStateChanged()
[all …]
/external/python/cpython3/Lib/test/
Dtest_concurrent_futures.py126 self.executor = self.executor_type(
131 self.executor = self.executor_type(
137 self.executor.shutdown(wait=True)
138 self.executor = None
151 # Make sure that the executor is ready to do work before running the
153 futures = [self.executor.submit(time.sleep, 0.1)
234 futures = [self.executor.submit(get_init_status)
262 future = self.executor.submit(get_init_status)
264 # Perhaps the executor is already broken
269 # At some point, the executor should break
[all …]
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/tracing/
DPropagatedFutures.java26 import java.util.concurrent.Executor;
40 Executor executor) { in transformAsync() argument
41 return Futures.transformAsync(input, function, executor); in transformAsync()
46 ListenableFuture<I> input, Function<? super I, ? extends O> function, Executor executor) { in transform() argument
47 return Futures.transform(input, function, executor); in transform()
51 ListenableFuture<V> future, FutureCallback<? super V> callback, Executor executor) { in addCallback() argument
52 Futures.addCallback(future, callback, executor); in addCallback()
59 Executor executor) { in catching() argument
60 return Futures.catching(input, exceptionType, fallback, executor); in catching()
67 Executor executor) { in catchingAsync() argument
[all …]
DPropagatedFluentFuture.java24 import java.util.concurrent.Executor;
31 * Note that the {@link ListenableFuture#addListener(Runnable, Executor)} method <b>does not</b>
50 * See {@link com.google.common.util.concurrent.FluentFuture#catching(Class, Function, Executor)}.
53 Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) { in catching() argument
55 PropagatedFutures.catching(delegate(), exceptionType, fallback, executor)); in catching()
60 * Executor)}.
63 Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) { in catchingAsync() argument
65 PropagatedFutures.catchingAsync(delegate(), exceptionType, fallback, executor)); in catchingAsync()
80 * Executor)}.
83 AsyncFunction<? super V, T> function, Executor executor) { in transformAsync() argument
[all …]
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/
DCronetDataSourceFactory.java25 import java.util.concurrent.Executor;
43 private final Executor executor; field in CronetDataSourceFactory
60 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
66 Executor executor, in CronetDataSourceFactory() argument
70 executor, in CronetDataSourceFactory()
88 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
90 public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor) { in CronetDataSourceFactory() argument
91 this(cronetEngineWrapper, executor, /* userAgent= */ (String) null); in CronetDataSourceFactory()
104 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
110 CronetEngineWrapper cronetEngineWrapper, Executor executor, @Nullable String userAgent) { in CronetDataSourceFactory() argument
[all …]
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/
DCronetDataSourceFactory.java23 import java.util.concurrent.Executor;
39 private final Executor executor; field in CronetDataSourceFactory
56 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
62 Executor executor, in CronetDataSourceFactory() argument
66 executor, in CronetDataSourceFactory()
84 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
86 public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor) { in CronetDataSourceFactory() argument
87 this(cronetEngineWrapper, executor, /* userAgent= */ (String) null); in CronetDataSourceFactory()
100 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
106 CronetEngineWrapper cronetEngineWrapper, Executor executor, @Nullable String userAgent) { in CronetDataSourceFactory() argument
[all …]
/external/cronet/net/proxy_resolution/
Dmulti_threaded_proxy_resolver.cc41 // An "executor" is a job-runner for PAC requests. It encapsulates a worker
44 class Executor : public base::RefCountedThreadSafe<Executor> { class
48 virtual void OnExecutorReady(Executor* executor) = 0;
55 // signal when the executor is ready to receive work by calling
58 Executor(Coordinator* coordinator, int thread_number);
60 // Submit a job to this executor.
63 // Callback for when a job has completed running on the executor's thread.
66 // Cleanup the executor. Cancels all outstanding work, and frees the thread
88 friend class base::RefCountedThreadSafe<Executor>;
89 ~Executor();
[all …]
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/
DExecutors.kt14 * [CoroutineDispatcher] that has underlying [Executor] for dispatching tasks.
18 * asynchronous API that requires an instance of the [Executor].
28 * Underlying executor of current [CoroutineDispatcher].
30 public abstract val executor: Executor constant in kotlinx.coroutines.ExecutorCoroutineDispatcher
33 * Closes this coroutine dispatcher and shuts down its executor.
50 * on this executor using [schedule][ScheduledExecutorService.schedule] method. If the corresponding in close()
57 * If the executor service is neither of this types, the separate internal thread will be used to in close()
59 * on top of the given executor. in close()
62 * If the underlying executor throws [RejectedExecutionException] on in close()
64 …* resulting dispatcher, on underlying executor [shutdown][ExecutorService.shutdown], or when it us… in close()
[all …]
/external/guava/guava/src/com/google/common/eventbus/
DAsyncEventBus.java17 import java.util.concurrent.Executor;
20 * An {@link EventBus} that takes the Executor of your choice and uses it to dispatch events,
30 * Creates a new AsyncEventBus that will use {@code executor} to dispatch events. Assigns {@code
34 * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
35 * down the executor after the last event has been posted to this event bus.
37 public AsyncEventBus(String identifier, Executor executor) { in AsyncEventBus() argument
38 super(identifier, executor, Dispatcher.legacyAsync(), LoggingHandler.INSTANCE); in AsyncEventBus()
42 * Creates a new AsyncEventBus that will use {@code executor} to dispatch events.
44 * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
45 * down the executor after the last event has been posted to this event bus.
[all …]
/external/guava/android/guava/src/com/google/common/eventbus/
DAsyncEventBus.java17 import java.util.concurrent.Executor;
20 * An {@link EventBus} that takes the Executor of your choice and uses it to dispatch events,
30 * Creates a new AsyncEventBus that will use {@code executor} to dispatch events. Assigns {@code
34 * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
35 * down the executor after the last event has been posted to this event bus.
37 public AsyncEventBus(String identifier, Executor executor) { in AsyncEventBus() argument
38 super(identifier, executor, Dispatcher.legacyAsync(), LoggingHandler.INSTANCE); in AsyncEventBus()
42 * Creates a new AsyncEventBus that will use {@code executor} to dispatch events.
44 * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
45 * down the executor after the last event has been posted to this event bus.
[all …]
/external/crosvm/cros_async/src/sys/unix/
Dexecutor.rs44 /// An executor for scheduling tasks that poll futures to completion.
46 /// All asynchronous operations must run within an executor, which is capable of spawning futures as
47 /// tasks. This executor also provides a mechanism for performing asynchronous I/O operations.
49 /// The returned type is a cheap, clonable handle to the underlying executor. Cloning it will only
50 /// create a new reference, not a new executor.
56 …review.googlesource.com/c/chromiumos/platform/crosvm/+/2571401/2..6/cros_async/src/executor.rs#b75>
68 /// use cros_async::{AsyncResult, Executor, IoSource, complete3};
110 /// let ex = Executor::new()?;
142 pub enum Executor { enum
147 /// An enum to express the kind of the backend of `Executor`
[all …]
/external/guava/android/guava/src/com/google/common/util/concurrent/
DExecutionList.java21 import java.util.concurrent.Executor;
28 * instance contains a list of listeners, each with an associated {@code Executor}, and guarantees
34 * <p>Exceptions thrown by a listener will be propagated up to the executor. Any exception thrown
35 * during {@code Executor.execute} (e.g., a {@code RejectedExecutionException} or an exception
49 * The runnable, executor pairs to execute. This acts as a stack threaded through the {@link
63 * Adds the {@code Runnable} and accompanying {@code Executor} to the list of listeners to
66 * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See
70 public void add(Runnable runnable, Executor executor) { in add() argument
71 // Fail fast on a null. We throw NPE here because the contract of Executor states that it throws in add()
74 checkNotNull(executor, "Executor was null."); in add()
[all …]
/external/guava/guava/src/com/google/common/util/concurrent/
DExecutionList.java21 import java.util.concurrent.Executor;
28 * instance contains a list of listeners, each with an associated {@code Executor}, and guarantees
34 * <p>Exceptions thrown by a listener will be propagated up to the executor. Any exception thrown
35 * during {@code Executor.execute} (e.g., a {@code RejectedExecutionException} or an exception
49 * The runnable, executor pairs to execute. This acts as a stack threaded through the {@link
63 * Adds the {@code Runnable} and accompanying {@code Executor} to the list of listeners to
66 * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See
70 public void add(Runnable runnable, Executor executor) { in add() argument
71 // Fail fast on a null. We throw NPE here because the contract of Executor states that it throws in add()
74 checkNotNull(executor, "Executor was null."); in add()
[all …]
DMoreExecutors.java42 import java.util.concurrent.Executor;
57 * Factory and utility methods for {@link java.util.concurrent.Executor}, {@link ExecutorService},
77 * @param executor the executor to modify to make sure it exits when the application is finished
78 * @param terminationTimeout how long to wait for the executor to finish before terminating the
86 ThreadPoolExecutor executor, Duration terminationTimeout) { in getExitingExecutorService() argument
88 executor, toNanosSaturated(terminationTimeout), TimeUnit.NANOSECONDS); in getExitingExecutorService()
98 * @param executor the executor to modify to make sure it exits when the application is finished
99 * @param terminationTimeout how long to wait for the executor to finish before terminating the
108 ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { in getExitingExecutorService() argument
109 return new Application().getExitingExecutorService(executor, terminationTimeout, timeUnit); in getExitingExecutorService()
[all …]
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/
Dexecutor.cc21 #include "src/core/lib/iomgr/executor.h"
42 gpr_log(GPR_INFO, "EXECUTOR " format, __VA_ARGS__); \
49 gpr_log(GPR_INFO, "EXECUTOR " str); \
58 Executor* executors[static_cast<size_t>(ExecutorType::NUM_EXECUTORS)];
90 TraceFlag executor_trace(false, "executor");
92 Executor::Executor(const char* name) : name_(name) { in Executor() function in grpc_core::Executor
98 void Executor::Init() { SetThreading(true); } in Init()
100 size_t Executor::RunClosures(const char* executor_name, in RunClosures()
104 // In the executor, the ExecCtx for the thread is declared in the executor in RunClosures()
110 // the executor's closure list (which were explicitly scheduled onto the in RunClosures()
[all …]
/external/rust/crates/jni/tests/
Dexecutor.rs8 use jni::{sys::jint, Executor};
15 let executor = Executor::new(jvm().clone()); in single_thread() localVariable
16 test_single_thread(executor); in single_thread()
21 let executor = Executor::new(jvm().clone()); in serialized_threads() localVariable
22 test_serialized_threads(executor); in serialized_threads()
27 let executor = Executor::new(jvm().clone()); in concurrent_threads() localVariable
29 test_concurrent_threads(executor, THREAD_NUM) in concurrent_threads()
32 fn test_single_thread(executor: Executor) { in test_single_thread() argument
33 let mut atomic = AtomicIntegerProxy::new(executor, 0).unwrap(); in test_single_thread()
40 fn test_serialized_threads(executor: Executor) { in test_serialized_threads() argument
[all …]
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/
DRejectedExecutionTest.kt17 private val executor = RejectingExecutor() in <lambda>() constant in kotlinx.coroutines.RejectedExecutionTest
21 executor.shutdown() in <lambda>()
22 executor.awaitTermination(10, TimeUnit.SECONDS) in <lambda>()
28 val job = launch(executor.asCoroutineDispatcher()) { in <lambda>()
31 assertEquals(1, executor.submittedTasks) in <lambda>()
39 val job = launch(executor.asCoroutineDispatcher(), start = CoroutineStart.ATOMIC) { in <lambda>()
44 assertEquals(1, executor.submittedTasks) in <lambda>()
53 withContext(executor.asCoroutineDispatcher()) { in <lambda>()
57 assertEquals(1, executor.submittedTasks) in <lambda>()
64 executor.acceptTasks = 1 // accept one task in <lambda>()
[all …]
/external/libchrome/mojo/public/java/bindings/src/org/chromium/mojo/bindings/
DExecutorFactory.java20 import java.util.concurrent.Executor;
35 * Implementation of the executor which uses a pair of {@link MessagePipeHandle} for signaling.
36 * The executor will wait asynchronously on one end of a {@link MessagePipeHandle} on the thread
38 * executor will queue the {@link Runnable} and write a message on the other end of the handle.
39 * This will wake up the executor which is waiting on the handle, which will then dequeue the
42 private static class PipedExecutor implements Executor, Callback {
93 * Close the handles. Should only be called on the executor thread.
134 * Execute the given |command| in the executor thread. This can be called on any thread.
136 * @see Executor#execute(Runnable)
141 // from the executor's thread. in execute()
[all …]
/external/robolectric/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowImsMmTelManager.java23 import java.util.concurrent.Executor;
53 private final Map<ImsMmTelManager.RegistrationCallback, Executor>
55 private final Map<RegistrationManager.RegistrationCallback, Executor>
57 private final Map<CapabilityCallback, Executor> capabilityCallbackExecutorMap = new ArrayMap<>();
69 * #registerImsRegistrationCallback(Executor, RegistrationCallback)} and {@link
70 * #registerMmTelCapabilityCallback(Executor, CapabilityCallback)}.
79 @NonNull @CallbackExecutor Executor executor, @NonNull ImsMmTelManager.RegistrationCallback c) in registerImsRegistrationCallback()
85 registrationCallbackExecutorMap.put(c, executor); in registerImsRegistrationCallback()
95 @NonNull @CallbackExecutor Executor executor, in registerImsRegistrationCallback()
102 registrationManagerCallbackExecutorMap.put(c, executor); in registerImsRegistrationCallback()
[all …]
/external/crosvm/cros_async/src/sys/windows/
Dexecutor.rs26 /// An executor for scheduling tasks that poll futures to completion.
28 /// All asynchronous operations must run within an executor, which is capable of spawning futures as
29 /// tasks. This executor also provides a mechanism for performing asynchronous I/O operations.
31 /// The returned type is a cheap, clonable handle to the underlying executor. Cloning it will only
32 /// create a new reference, not a new executor.
38 …-review.googlesource.com/c/chromiumos/platform/crosvm/+/2571401/2..6/cros_async/src/executor.rs#b75
50 /// use cros_async::{AsyncResult, Executor, IoSource, complete3};
92 /// let ex = Executor::new()?;
124 pub enum Executor { enum
128 /// An enum to express the kind of the backend of `Executor`
[all …]

12345678910>>...82