Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 16 for FutureTask (0.09 seconds)

  1. guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        FutureTask<Boolean> interruptReporter = untimedInterruptReporter(future, false);
    
        runNInterruptsTest(times, future, interruptReporter);
      }
    
      private static void runTimedInterruptsTest(int times)
          throws InterruptedException, ExecutionException, TimeoutException {
        SettableFuture<String> future = SettableFuture.create();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        FutureTask<Boolean> interruptReporter = untimedInterruptReporter(future, false);
    
        runNInterruptsTest(times, future, interruptReporter);
      }
    
      private static void runTimedInterruptsTest(int times)
          throws InterruptedException, ExecutionException, TimeoutException {
        SettableFuture<String> future = SettableFuture.create();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt

      private fun serviceSocketTask(socket: BufferedSocket): FutureTask<Void> {
        return FutureTask<Void> {
          socket.source.use {
            socket.sink.use {
              while (true) {
                val action = actions.poll() ?: break
                action(socket)
              }
            }
          }
          return@FutureTask null
        }
      }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Jul 31 04:18:40 GMT 2025
    - 3.3K bytes
    - Click Count (0)
  4. android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java

    import java.util.concurrent.Executor;
    import java.util.concurrent.FutureTask;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A {@link FutureTask} that also implements the {@link ListenableFuture} interface. Unlike {@code
     * FutureTask}, {@code ListenableFutureTask} does not provide an overrideable {@link
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Feb 10 11:51:21 GMT 2026
    - 4.2K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

              protected Integer initialValue() {
                return 0;
              }
            };
        Runnable incrementTask = () -> threadLocalCount.set(threadLocalCount.get() + 1);
    
        FutureTask<@Nullable Void> otherTask =
            new FutureTask<>(
                () -> {
                  Future<?> future = executor.submit(incrementTask);
                  assertTrue(future.isDone());
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 26.1K bytes
    - Click Count (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

          val existingTask = activeTask
          if (existingTask is AwaitIdleTask) {
            return existingTask.latch
          }
          for (futureTask in futureTasks) {
            if (futureTask is AwaitIdleTask) {
              return futureTask.latch
            }
          }
    
          // Don't delegate to schedule() because that enforces shutdown rules.
          val newTask = AwaitIdleTask()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed May 28 23:28:25 GMT 2025
    - 7.3K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

              protected Integer initialValue() {
                return 0;
              }
            };
        Runnable incrementTask = () -> threadLocalCount.set(threadLocalCount.get() + 1);
    
        FutureTask<@Nullable Void> otherTask =
            new FutureTask<>(
                () -> {
                  Future<?> future = executor.submit(incrementTask);
                  assertTrue(future.isDone());
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 26.1K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

            (timeout == null) ? "untimed" : timeout,
            scenario,
            expectedOutcome);
      }
    
      @Override
      protected void runTest() throws Throwable {
        FutureTask<@Nullable Void> task = new FutureTask<>(this::runChosenTest, null);
        startThread(task::run);
        awaitUninterruptibly(doingCallLatch);
        long hangDelayMillis =
            (expectedOutcome == Outcome.HANG)
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 26.7K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

        assertFalse(waiter.isAlive());
      }
    
      public void testAwaitTerminated_failedService() throws Exception {
        ManualSwitchedService service = new ManualSwitchedService();
        FutureTask<IllegalStateException> waiter =
            new FutureTask<>(() -> assertThrows(IllegalStateException.class, service::awaitTerminated));
        new Thread(waiter).start();
        service.startAsync();
        service.notifyStarted();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 28.7K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

        assertFalse(waiter.isAlive());
      }
    
      public void testAwaitTerminated_failedService() throws Exception {
        ManualSwitchedService service = new ManualSwitchedService();
        FutureTask<IllegalStateException> waiter =
            new FutureTask<>(() -> assertThrows(IllegalStateException.class, service::awaitTerminated));
        new Thread(waiter).start();
        service.startAsync();
        service.notifyStarted();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 28.7K bytes
    - Click Count (0)
Back to Top