- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 669 for executor (0.1 sec)
-
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) -
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) -
guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java
assertEquals(0, numCalls.get()); reject.set(false); executor.execute(task); assertEquals(1, numCalls.get()); } /* * Under Android, MyError propagates up and fails the test? * * TODO(b/218700094): Does this matter to prod users, or is it just a feature of our testing
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 11.4K 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) -
guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java
assertEquals(Service.State.STOPPING, state()); shutdownCalled++; } @Override protected Executor executor() { return executor; } @Override public void tearDown() throws Exception { executor.shutdown(); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 12.7K 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/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) -
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-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) -
guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
/** The future that represents the next execution of this task. */ @GuardedBy("lock") @CheckForNull private SupplantableFuture cancellationDelegate; ReschedulableCallable( AbstractService service, ScheduledExecutorService executor, Runnable runnable) { this.wrappedRunnable = runnable; this.executor = executor; this.service = service; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 16:22:21 UTC 2024 - 27.8K bytes - Viewed (0)