Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 81 for executorService (0.44 sec)

  1. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

       * future is {@linkplain Future#isDone() done}.
       *
       * <p>Prefer to create {@code ListenableFuture} instances with {@link SettableFuture}, {@link
       * MoreExecutors#listeningDecorator( java.util.concurrent.ExecutorService)}, {@link
       * ListenableFutureTask}, {@link AbstractFuture}, and other utilities over creating plain {@code
       * Future} instances to be upgraded to {@code ListenableFuture} after the fact.
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/ListenableFutureTask.java

     * FutureTask#done() done()} method. For similar functionality, call {@link #addListener}.
     *
     * <p>Few users should use this class. It is intended primarily for those who are implementing an
     * {@code ExecutorService}. Most users should call {@link ListeningExecutorService#submit(Callable)
     * ListeningExecutorService.submit} on a service obtained from {@link
     * MoreExecutors#listeningDecorator}.
     *
     * @author Sven Mawson
     * @since 1.0
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.ExecutorService;
    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Used to test listenable future implementations.
     *
     * @author Sven Mawson
     */
    @NullUnmarked
    public class ListenableFutureTester {
    
      private final ExecutorService exec;
      private final ListenableFuture<?> future;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/ListenableFuture.java

     * instances:
     *
     * <ul>
     *   <li>If you receive them from an {@code java.util.concurrent.ExecutorService}, convert that
     *       service to a {@link ListeningExecutorService}, usually by calling {@link
     *       MoreExecutors#listeningDecorator(java.util.concurrent.ExecutorService)
     *       MoreExecutors.listeningDecorator}.
     *   <li>If you manually call {@link java.util.concurrent.FutureTask#set} or a similar method,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 8K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java

            .url("ws://echo.websocket.org")
            .build();
        client.newWebSocket(request, this);
    
        // Trigger shutdown of the dispatcher's executor so this process exits immediately.
        client.dispatcher().executorService().shutdown();
      }
    
      @Override public void onOpen(WebSocket webSocket, Response response) {
        webSocket.send("Hello...");
        webSocket.send("...World!");
        webSocket.send(ByteString.decodeHex("deadbeef"));
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Apr 04 11:40:21 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

        @Override
        protected final void doStart() {
          executorService =
              MoreExecutors.renamingDecorator(executor(), () -> serviceName() + " " + state());
          executorService.execute(
              () -> {
                lock.lock();
                try {
                  startUp();
                  /*
                   * requireNonNull is safe because executorService is never cleared after the
                   * assignment above.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.7K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/DispatcherCleanupTest.kt

            ) {
              response.close()
            }
          }
        repeat(10_000) {
          okhttp.newCall(Request.Builder().url(server.url("/")).build()).enqueue(callback)
        }
        okhttp.dispatcher.executorService.shutdown()
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java

    import java.util.concurrent.TimeUnit;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A {@link ScheduledExecutorService} that returns {@link ListenableFuture} instances from its
     * {@code ExecutorService} methods. To create an instance from an existing {@link
     * ScheduledExecutorService}, call {@link
     * MoreExecutors#listeningDecorator(ScheduledExecutorService)}.
     *
     * @author Chris Povirk
     * @since 10.0
     */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Feb 11 17:30:04 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  9. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

    import java.util.Collections;
    import java.util.LinkedHashSet;
    import java.util.Set;
    import java.util.concurrent.BlockingQueue;
    import java.util.concurrent.ConcurrentHashMap;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.LinkedBlockingQueue;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicInteger;
    import okhttp3.Cache;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jul 23 00:58:06 UTC 2025
    - 5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        ExecutorService executor = newFixedThreadPool(1);
        requestInterruptIn(500);
        executor.execute(new SleepTask(10000));
        executor.shutdown();
        assertFalse(awaitTerminationUninterruptibly(executor, 1000, MILLISECONDS));
        assertFalse(executor.isTerminated());
        assertInterrupted();
      }
    
      public void testTryAwaitTerminationInfiniteTimeout() {
        ExecutorService executor = newFixedThreadPool(1);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 31.7K bytes
    - Viewed (0)
Back to top