- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 232 for Executor (0.07 sec)
-
guava/src/com/google/common/util/concurrent/MoreExecutors.java
* * @param executor The executor to decorate * @param nameSupplier The source of names for each task */ @J2ktIncompatible @GwtIncompatible // concurrency static Executor renamingDecorator(final Executor executor, final Supplier<String> nameSupplier) { checkNotNull(executor); checkNotNull(nameSupplier); return new Executor() { @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 44.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
executor.shutdown(); assertTrue(executor.isShutdown()); assertThrows(RejectedExecutionException.class, () -> executor.submit(doNothingRunnable)); assertFalse(executor.isTerminated()); // WAIT #2 barrier.await(1, SECONDS); assertFalse(executor.awaitTermination(20, MILLISECONDS)); // WAIT #3 barrier.await(1, SECONDS); assertTrue(executor.awaitTermination(1, SECONDS));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 28.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java
final Executor delegate = new Executor() { @Override public void execute(Runnable task) { if (future.set(null)) { awaitUninterruptibly(latch); } throw new RejectedExecutionException(); } }; final SequentialExecutor executor = new SequentialExecutor(delegate);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 11.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_remote_test.cc
TFE_DeleteTensorHandle(h1_task1); TFE_DeleteTensorHandle(retvals[0]); TFE_DeleteOp(matmul); TFE_Executor* executor = TFE_ContextGetExecutorForThread(ctx); TFE_ExecutorWaitForAllPendingNodes(executor, status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TFE_DeleteExecutor(executor); TFE_DeleteContext(ctx); TF_DeleteStatus(status);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Aug 12 00:14:22 UTC 2020 - 5.4K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
} private void parallelDrainQueue(int threadCount) { ExecutorService executor = Executors.newFixedThreadPool(threadCount); for (int i = 0; i < threadCount; i++) { executor.execute(() -> { try { drainQueue(); } catch (Exception e) { e.printStackTrace(); } }); } executor.shutdown(); } private void drainQueue() throws Exception {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 4.6K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java
*/ public static <V extends @Nullable Object> ListenableFuture<V> listenInPoolThread( Future<V> future, Executor executor) { checkNotNull(executor); if (future instanceof ListenableFuture) { return (ListenableFuture<V>) future; } return new ListenableFutureAdapter<>(future, executor); } /** * An adapter to turn a {@link Future} into a {@link ListenableFuture}. This will wait on the
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Dec 14 20:35:03 UTC 2023 - 7.5K bytes - Viewed (0) -
android/guava/src/com/google/common/eventbus/AsyncEventBus.java
super(identifier, executor, Dispatcher.legacyAsync(), LoggingHandler.INSTANCE); } /** * Creates a new AsyncEventBus that will use {@code executor} to dispatch events. * * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut * down the executor after the last event has been posted to this event bus.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Apr 22 13:05:46 UTC 2021 - 2.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
class RelayTest { @TempDir var tempDir: File? = null private val executor = Executors.newCachedThreadPool(threadFactory("RelayTest")) private val metadata: ByteString = "great metadata!".encodeUtf8() private lateinit var file: File @BeforeEach fun setUp() { file = File(tempDir, "test") } @AfterEach fun tearDown() { executor.shutdown() } @Test fun singleSource() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 8.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
private static AsyncCallable<Integer> asyncAdd( final ListenableFuture<Integer> future, final int delta, final Executor executor) { return new AsyncCallable<Integer>() { @Override public ListenableFuture<Integer> call() throws Exception { return Futures.transform(future, add(delta), executor); } }; } private static final class LongHolder { long count; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.7K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/AbstractFutureFootprintBenchmark.java
import com.google.common.util.concurrent.AbstractFutureBenchmarks.Facade; import com.google.common.util.concurrent.AbstractFutureBenchmarks.Impl; import java.util.HashSet; import java.util.Set; import java.util.concurrent.Executor; /** Measures the size of AbstractFuture implementations. */ public class AbstractFutureFootprintBenchmark { enum State { NOT_DONE, FINISHED, CANCELLED, FAILED }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 2.9K bytes - Viewed (0)