Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 11 for FutureTask (0.07 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. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. android/guava/src/com/google/common/util/concurrent/ListenableFuture.java

     *       MoreExecutors#listeningDecorator(java.util.concurrent.ExecutorService)
     *       MoreExecutors.listeningDecorator}.
     *   <li>If you manually call {@link java.util.concurrent.FutureTask#set} or a similar method,
     *       create a {@link SettableFuture} instead. (If your needs are more complex, you may prefer
     *       {@link AbstractFuture}.)
     * </ul>
     *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 22:14:05 GMT 2026
    - 8K bytes
    - Click Count (0)
Back to Top