Home
last modified time | relevance | path

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

12345678910>>...59

/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/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/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.py120 self.executor = self.executor_type(
125 self.executor = self.executor_type(
131 self.executor.shutdown(wait=True)
132 self.executor = None
145 # Make sure that the executor is ready to do work before running the
147 futures = [self.executor.submit(time.sleep, 0.1)
213 futures = [self.executor.submit(get_init_status)
241 future = self.executor.submit(get_init_status)
243 # Perhaps the executor is already broken
248 # At some point, the executor should break
[all …]
/external/exoplayer/tree/extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/
DCronetDataSourceFactory.java24 import java.util.concurrent.Executor;
45 private final Executor executor; field in CronetDataSourceFactory
63 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
69 Executor executor, in CronetDataSourceFactory() argument
73 executor, in CronetDataSourceFactory()
92 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
97 Executor executor, in CronetDataSourceFactory() argument
101 executor, in CronetDataSourceFactory()
121 * @param executor The {@link java.util.concurrent.Executor} that will perform the requests.
129 Executor executor, in CronetDataSourceFactory() argument
[all …]
/external/guava/guava/src/com/google/common/eventbus/
DAsyncEventBus.java18 import java.util.concurrent.Executor;
21 * An {@link EventBus} that takes the Executor of your choice and uses it to dispatch events,
31 * Creates a new AsyncEventBus that will use {@code executor} to dispatch events. Assigns {@code
35 * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
36 * down the executor after the last event has been posted to this event bus.
38 public AsyncEventBus(String identifier, Executor executor) { in AsyncEventBus() argument
39 super(identifier, executor, Dispatcher.legacyAsync(), LoggingHandler.INSTANCE); in AsyncEventBus()
43 * Creates a new AsyncEventBus that will use {@code executor} to dispatch events.
45 * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
46 * 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.java18 import java.util.concurrent.Executor;
21 * An {@link EventBus} that takes the Executor of your choice and uses it to dispatch events,
31 * Creates a new AsyncEventBus that will use {@code executor} to dispatch events. Assigns {@code
35 * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
36 * down the executor after the last event has been posted to this event bus.
38 public AsyncEventBus(String identifier, Executor executor) { in AsyncEventBus() argument
39 super(identifier, executor, Dispatcher.legacyAsync(), LoggingHandler.INSTANCE); in AsyncEventBus()
43 * Creates a new AsyncEventBus that will use {@code executor} to dispatch events.
45 * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
46 * down the executor after the last event has been posted to this event bus.
[all …]
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/
DExecutors.kt13 * [CoroutineDispatcher] that has underlying [Executor] for dispatching tasks.
17 * asynchronous API that requires an instance of the [Executor].
27 * Underlying executor of current [CoroutineDispatcher].
29 public abstract val executor: Executor constant in kotlinx.coroutines.ExecutorCoroutineDispatcher
32 * Closes this coroutine dispatcher and shuts down its executor.
42 * If the underlying executor throws [RejectedExecutionException] on in close()
44 …* resulting dispatcher, on underlying executor [shutdown][ExecutorService.shutdown], or when it us… in close()
53 * Converts an instance of [Executor] to an implementation of [CoroutineDispatcher]. in close()
55 * If the underlying executor throws [RejectedExecutionException] on in close()
57 …* resulting dispatcher, on underlying executor [shutdown][ExecutorService.shutdown], or when it us… in close()
[all …]
/external/llvm-project/clang/unittests/Tooling/
DExecutionTest.cpp124 const char *TestToolExecutor::ExecutorName = "test-executor";
135 X("test-executor", "Plugin for TestToolExecutor.");
142 auto Executor = internal::createExecutorFromCommandLineArgsImpl( in TEST() local
144 ASSERT_FALSE((bool)Executor); in TEST()
145 llvm::consumeError(Executor.takeError()); in TEST()
157 auto Executor = internal::createExecutorFromCommandLineArgsImpl( in TEST() local
159 ASSERT_TRUE((bool)Executor); in TEST()
167 auto Executor = internal::createExecutorFromCommandLineArgsImpl( in TEST() local
169 ASSERT_TRUE((bool)Executor); in TEST()
170 EXPECT_EQ(Executor->get()->getExecutorName(), in TEST()
[all …]
/external/crosvm/cros_async/src/
Dexecutor.rs30 /// An executor for scheduling tasks that poll futures to completion.
32 /// All asynchronous operations must run within an executor, which is capable of spawning futures as
33 /// tasks. This executor also provides a mechanism for performing asynchronous I/O operations.
35 /// The returned type is a cheap, clonable handle to the underlying executor. Cloning it will only
36 /// create a new reference, not a new executor.
47 /// use cros_async::{AsyncResult, Executor, IoSourceExt, complete3};
88 /// let ex = Executor::new()?;
120 pub enum Executor { enum
125 impl Executor { impl
126 /// Create a new `Executor`.
[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
48 * The runnable, executor pairs to execute. This acts as a stack threaded through the {@link
61 * Adds the {@code Runnable} and accompanying {@code Executor} to the list of listeners to
64 * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See
68 public void add(Runnable runnable, Executor executor) { in add() argument
69 // Fail fast on a null. We throw NPE here because the contract of Executor states that it throws in add()
72 checkNotNull(executor, "Executor was null."); in add()
[all …]
DMoreExecutors.java42 import java.util.concurrent.Executor;
56 * Factory and utility methods for {@link java.util.concurrent.Executor}, {@link ExecutorService},
75 * @param executor the executor to modify to make sure it exits when the application is finished
76 * @param terminationTimeout how long to wait for the executor to finish before terminating the
84 ThreadPoolExecutor executor, Duration terminationTimeout) { in getExitingExecutorService() argument
86 executor, toNanosSaturated(terminationTimeout), TimeUnit.NANOSECONDS); in getExitingExecutorService()
96 * @param executor the executor to modify to make sure it exits when the application is finished
97 * @param terminationTimeout how long to wait for the executor to finish before terminating the
106 ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { in getExitingExecutorService() argument
107 return new Application().getExitingExecutorService(executor, terminationTimeout, timeUnit); in getExitingExecutorService()
[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
48 * The runnable, executor pairs to execute. This acts as a stack threaded through the {@link
62 * Adds the {@code Runnable} and accompanying {@code Executor} to the list of listeners to
65 * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See
69 public void add(Runnable runnable, Executor executor) { in add() argument
70 // Fail fast on a null. We throw NPE here because the contract of Executor states that it throws in add()
73 checkNotNull(executor, "Executor was null."); in add()
[all …]
DMoreExecutors.java40 import java.util.concurrent.Executor;
54 * Factory and utility methods for {@link java.util.concurrent.Executor}, {@link ExecutorService},
73 * @param executor the executor to modify to make sure it exits when the application is finished
74 * @param terminationTimeout how long to wait for the executor to finish before terminating the
83 ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { in getExitingExecutorService() argument
84 return new Application().getExitingExecutorService(executor, terminationTimeout, timeUnit); in getExitingExecutorService()
92 * <p>This method waits 120 seconds before continuing with JVM termination, even if the executor
97 * @param executor the executor to modify to make sure it exits when the application is finished
102 public static ExecutorService getExitingExecutorService(ThreadPoolExecutor executor) { in getExitingExecutorService() argument
103 return new Application().getExitingExecutorService(executor); in getExitingExecutorService()
[all …]
/external/python/futures/
Dtest_futures.py142 self.executor = self.executor_type(max_workers=self.worker_count)
149 self.executor.shutdown(wait=True)
156 # Make sure that the executor is ready to do work before running the
158 futures = [self.executor.submit(time.sleep, 0.1)
175 self.executor.shutdown()
177 self.executor.submit,
195 fs = [self.executor.submit(time.sleep, 0.1) for _ in range(50)]
196 self.executor.shutdown()
206 self.executor.submit(mul, 21, 2)
207 self.executor.submit(mul, 6, 7)
[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/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/
DRejectedExecutionTest.kt17 private val executor = RejectingExecutor() in <lambda>() constant
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/tensorflow/tensorflow/stream_executor/tpu/
Dtpu_executor_c_api.h45 void TpuExecutor_Init(SE_StreamExecutor* executor, int device_ordinal,
47 void TpuExecutor_Free(SE_StreamExecutor* executor);
49 int TpuExecutor_PlatformDeviceCount(SE_StreamExecutor* executor);
51 SE_DeviceMemoryBase TpuExecutor_Allocate(SE_StreamExecutor* executor,
53 void TpuExecutor_Deallocate(SE_StreamExecutor* executor,
55 bool TpuExecutor_GetAllocatorStats(SE_StreamExecutor* executor,
57 bool TpuExecutor_DeviceMemoryUsage(SE_StreamExecutor* executor, int64_t* free,
60 bool TpuExecutor_AllocateStream(SE_StreamExecutor* executor, SE_Stream* stream);
61 void TpuExecutor_DeallocateStream(SE_StreamExecutor* executor,
63 bool TpuExecutor_CreateStreamDependency(SE_StreamExecutor* executor,
[all …]
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DMoreExecutorsTest.java62 import java.util.concurrent.Executor;
92 final ListeningExecutorService executor = newDirectExecutorService(); in testDirectExecutorServiceServiceInThreadExecution() local
115 Future<?> future = executor.submit(incrementTask); in testDirectExecutorServiceServiceInThreadExecution()
126 ListenableFuture<?> future = executor.submit(incrementTask); in testDirectExecutorServiceServiceInThreadExecution()
140 final ExecutorService executor = newDirectExecutorService(); in testDirectExecutorServiceInvokeAll() local
159 List<Future<Integer>> futures = executor.invokeAll(Collections.nCopies(10, incrementTask)); in testDirectExecutorServiceInvokeAll()
171 final ExecutorService executor = newDirectExecutorService(); in testDirectExecutorServiceServiceTermination() local
187 executor.submit( in testDirectExecutorServiceServiceTermination()
196 assertTrue(executor.isShutdown()); in testDirectExecutorServiceServiceTermination()
197 assertFalse(executor.isTerminated()); in testDirectExecutorServiceServiceTermination()
[all …]
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DMoreExecutorsTest.java62 import java.util.concurrent.Executor;
92 final ListeningExecutorService executor = newDirectExecutorService(); in testDirectExecutorServiceServiceInThreadExecution() local
115 Future<?> future = executor.submit(incrementTask); in testDirectExecutorServiceServiceInThreadExecution()
126 ListenableFuture<?> future = executor.submit(incrementTask); in testDirectExecutorServiceServiceInThreadExecution()
140 final ExecutorService executor = newDirectExecutorService(); in testDirectExecutorServiceInvokeAll() local
159 List<Future<Integer>> futures = executor.invokeAll(Collections.nCopies(10, incrementTask)); in testDirectExecutorServiceInvokeAll()
171 final ExecutorService executor = newDirectExecutorService(); in testDirectExecutorServiceServiceTermination() local
187 executor.submit( in testDirectExecutorServiceServiceTermination()
196 assertTrue(executor.isShutdown()); in testDirectExecutorServiceServiceTermination()
197 assertFalse(executor.isTerminated()); in testDirectExecutorServiceServiceTermination()
[all …]
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DHttp2Ping.java23 import java.util.concurrent.Executor;
51 * The registered callbacks and the executor used to invoke them.
53 @GuardedBy("this") private Map<PingCallback, Executor> callbacks
54 = new LinkedHashMap<PingCallback, Executor>();
91 * @param executor the executor to use
93 public void addCallback(final ClientTransport.PingCallback callback, Executor executor) { in addCallback() argument
97 callbacks.put(callback, executor); in addCallback()
104 doExecute(executor, runnable); in addCallback()
124 Map<ClientTransport.PingCallback, Executor> callbacks; in complete()
135 for (Map.Entry<ClientTransport.PingCallback, Executor> entry : callbacks.entrySet()) { in complete()
[all …]

12345678910>>...59