| /external/guava/android/guava-tests/benchmark/com/google/common/util/concurrent/ |
| D | ExecutionListBenchmark.java | 34 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 …]
|
| D | MoreExecutorsDirectExecutorBenchmark.java | 30 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/ |
| D | ExecutionListBenchmark.java | 34 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 …]
|
| D | MoreExecutorsDirectExecutorBenchmark.java | 30 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/ |
| D | SerializingExecutorTest.java | 29 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 …]
|
| D | ConnectivityStateManagerTest.java | 29 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/guava/android/guava/src/com/google/common/eventbus/ |
| D | AsyncEventBus.java | 18 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/guava/src/com/google/common/eventbus/ |
| D | AsyncEventBus.java | 18 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/exoplayer/tree/extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/ |
| D | CronetDataSourceFactory.java | 24 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/python/cpython3/Lib/test/ |
| D | test_concurrent_futures.py | 120 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/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/ |
| D | Executors.kt | 13 * [CoroutineDispatcher] that has underlying [Executor] for dispatching tasks. 17 * asynchronous API which requires instance of the [Executor]. 21 * Closes this coroutine dispatcher and shuts down its executor. 28 * Underlying executor of current [CoroutineDispatcher]. in close() 30 public abstract val executor: Executor in close() constant in kotlinx.coroutines.ExecutorCoroutineDispatcher 41 * Converts an instance of [Executor] to an implementation of [CoroutineDispatcher]. in close() 44 public fun Executor.asCoroutineDispatcher(): CoroutineDispatcher = in close() 48 * Converts an instance of [CoroutineDispatcher] to an implementation of [Executor]. in close() 50 …* It returns the original executor when used on the result of [Executor.asCoroutineDispatcher] ext… in close() 52 public fun CoroutineDispatcher.asExecutor(): Executor = in close() [all …]
|
| /external/guava/guava/src/com/google/common/util/concurrent/ |
| D | ExecutionList.java | 21 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 …]
|
| D | MoreExecutors.java | 40 import java.util.concurrent.Executor; 55 * Factory and utility methods for {@link java.util.concurrent.Executor}, {@link ExecutorService}, 74 * @param executor the executor to modify to make sure it exits when the application is finished 75 * @param terminationTimeout how long to wait for the executor to finish before terminating the 84 ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { in getExitingExecutorService() argument 85 return new Application().getExitingExecutorService(executor, terminationTimeout, timeUnit); in getExitingExecutorService() 93 * <p>This method waits 120 seconds before continuing with JVM termination, even if the executor 98 * @param executor the executor to modify to make sure it exits when the application is finished 103 public static ExecutorService getExitingExecutorService(ThreadPoolExecutor executor) { in getExitingExecutorService() argument 104 return new Application().getExitingExecutorService(executor); in getExitingExecutorService() [all …]
|
| /external/guava/android/guava/src/com/google/common/util/concurrent/ |
| D | ExecutionList.java | 21 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 …]
|
| D | MoreExecutors.java | 40 import java.util.concurrent.Executor; 55 * Factory and utility methods for {@link java.util.concurrent.Executor}, {@link ExecutorService}, 74 * @param executor the executor to modify to make sure it exits when the application is finished 75 * @param terminationTimeout how long to wait for the executor to finish before terminating the 84 ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { in getExitingExecutorService() argument 85 return new Application().getExitingExecutorService(executor, terminationTimeout, timeUnit); in getExitingExecutorService() 93 * <p>This method waits 120 seconds before continuing with JVM termination, even if the executor 98 * @param executor the executor to modify to make sure it exits when the application is finished 103 public static ExecutorService getExitingExecutorService(ThreadPoolExecutor executor) { in getExitingExecutorService() argument 104 return new Application().getExitingExecutorService(executor); in getExitingExecutorService() [all …]
|
| /external/python/futures/ |
| D | test_futures.py | 142 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/libchrome/mojo/public/java/bindings/src/org/chromium/mojo/bindings/ |
| D | ExecutorFactory.java | 20 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/guava/android/guava-tests/test/com/google/common/util/concurrent/ |
| D | MoreExecutorsTest.java | 62 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/ |
| D | MoreExecutorsTest.java | 62 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/dagger2/javatests/dagger/functional/producers/ |
| D | ExecutorModule.java | 23 import java.util.concurrent.Executor; 26 * A module that provides an optionally user-defined executor for a production component, defaulting 27 * to the direct executor. 31 private final Executor executor; field in ExecutorModule 37 public ExecutorModule(Executor executor) { in ExecutorModule() argument 38 this.executor = executor; in ExecutorModule() 43 Executor executor() { in executor() method in ExecutorModule 44 return executor; in executor()
|
| /external/grpc-grpc-java/core/src/main/java/io/grpc/internal/ |
| D | Http2Ping.java | 23 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 …]
|
| D | ConnectivityStateManager.java | 24 import java.util.concurrent.Executor; 43 * <p>The {@code executor} must be one that can run RPC call listeners. 45 void notifyWhenStateChanged(Runnable callback, Executor executor, ConnectivityState source) { in notifyWhenStateChanged() argument 47 checkNotNull(executor, "executor"); in notifyWhenStateChanged() 50 Listener stateChangeListener = new Listener(callback, executor); in notifyWhenStateChanged() 70 // if run in direct executor, can cause ConcurrentModificationException. in gotoState() 92 final Executor executor; field in ConnectivityStateManager.Listener 94 Listener(Runnable callback, Executor executor) { in Listener() argument 96 this.executor = executor; in Listener() 100 executor.execute(callback); in runInExecutor()
|
| D | SerializingExecutor.java | 24 import java.util.concurrent.Executor; 31 * Executor ensuring that all {@link Runnable} tasks submitted are executed in order 32 * using the provided {@link Executor}, and serially such that no two will ever be 36 public final class SerializingExecutor implements Executor, Runnable { 61 /** Underlying executor that all submitted Runnable objects are run on. */ 62 private final Executor executor; field in SerializingExecutor 70 * Creates a SerializingExecutor, running tasks using {@code executor}. 72 * @param executor Executor in which tasks should be run. Must not be null. 74 public SerializingExecutor(Executor executor) { in SerializingExecutor() argument 75 Preconditions.checkNotNull(executor, "'executor' must not be null."); in SerializingExecutor() [all …]
|
| /external/python/cpython3/Lib/concurrent/futures/ |
| D | thread.py | 72 executor = executor_reference() 73 if executor is not None: 74 executor._initializer_failed() 85 executor = executor_reference() 86 if executor is not None: 87 executor._idle_semaphore.release() 88 del executor 91 executor = executor_reference() 94 # - The executor that owns the worker has been collected OR 95 # - The executor that owns the worker has been shutdown. [all …]
|
| /external/python/futures/docs/ |
| D | index.rst | 13 defined by the abstract :class:`Executor` class. 15 Executor Objects 18 :class:`Executor` is an abstract class that provides methods to execute calls 22 .. method:: Executor.submit(fn, *args, **kwargs) 29 with ThreadPoolExecutor(max_workers=1) as executor: 30 future = executor.submit(pow, 323, 1235) 33 .. method:: Executor.map(func, *iterables, timeout=None) 44 .. method:: Executor.shutdown(wait=True) 46 Signal the executor that it should free any resources that it is using when 48 :meth:`Executor.submit` and :meth:`Executor.map` made after shutdown will [all …]
|