Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for cancel (0.16 sec)

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

        assertFailed(future, cause);
      }
    
      public void testCanceled() throws Exception {
        assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue();
        assertCancelled(future, false);
      }
    
      public void testInterrupted() throws Exception {
        assertThat(future.cancel(true /* mayInterruptIfRunning */)).isTrue();
        assertCancelled(future, true);
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

        inputFuture.cancel(true); // argument is ignored
        assertThrows(CancellationException.class, () -> resultFuture.get());
      }
    
      public void testFutureGetThrowsCancellationIfOutputCancelled() throws Exception {
        inputFuture.set(SLOW_OUTPUT_VALID_INPUT_DATA);
        outputFuture.cancel(true); // argument is ignored
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  3. .github/workflows/ci.yml

                java: 21
                root-pom: pom.xml
        runs-on: ${{ matrix.os }}
        env:
          ROOT_POM: ${{ matrix.root-pom }}
        steps:
          # Cancel any previous runs for the same branch that are still running.
          - name: 'Cancel previous runs'
            uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
            with:
              access_token: ${{ github.token }}
          - name: 'Check out repository'
    Others
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 24 19:33:50 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

              : getUninterruptibly(future, timeoutDuration, timeoutUnit);
        } catch (InterruptedException e) {
          future.cancel(true);
          throw e;
        } catch (ExecutionException e) {
          throw throwCause(e, true /* combineStackTraces */);
        } catch (TimeoutException e) {
          future.cancel(true);
          throw new UncheckedTimeoutException(e);
        }
      }
    
      @CanIgnoreReturnValue
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 27 14:21:11 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

      }
    
      public void testListenerCalledOnCancelFromRunning() throws Exception {
        exec.execute(task);
        runLatch.await();
    
        // Task has started up, cancel it while it's running.
        task.cancel(true);
        assertTrue(task.isDone());
        assertTrue(task.isCancelled());
        assertEquals(1, taskLatch.getCount());
    
        // Wait for the listeners to be called.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

        System.clearProperty("guava.concurrent.generate_cancellation_cause");
      }
    
      public void testCancel_notDoneNoInterrupt() throws Exception {
        Future<?> future = newFutureInstance();
        assertTrue(future.cancel(false));
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
        assertNull(tryInternalFastPathGetFailure(future));
        CancellationException e = assertThrows(CancellationException.class, () -> future.get());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

      }
    
      public void testCancelled() throws Exception {
        TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create(returning(2));
        assertFalse(task.isDone());
        task.cancel(false);
        assertTrue(task.isDone());
        assertTrue(task.isCancelled());
        assertFalse(task.wasInterrupted());
        try {
          getDone(task);
          fail();
        } catch (CancellationException expected) {
        }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/ForwardingFluentFuture.java

      }
    
      @Override
      public void addListener(Runnable listener, Executor executor) {
        delegate.addListener(listener, executor);
      }
    
      @Override
      public boolean cancel(boolean mayInterruptIfRunning) {
        return delegate.cancel(mayInterruptIfRunning);
      }
    
      @Override
      public boolean isCancelled() {
        return delegate.isCancelled();
      }
    
      @Override
      public boolean isDone() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 05 22:27:35 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/ImmediateFuture.java

                      + listener
                      + " with executor "
                      + executor,
                  e);
        }
      }
    
      @Override
      public boolean cancel(boolean mayInterruptIfRunning) {
        return false;
      }
    
      // TODO(lukes): Consider throwing InterruptedException when appropriate.
      @Override
      @ParametricNullness
      public V get() {
        return value;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

          super.addListener(listener, executor);
        }
    
        @CanIgnoreReturnValue
        @Override
        public final boolean cancel(boolean mayInterruptIfRunning) {
          return super.cancel(mayInterruptIfRunning);
        }
      }
    
      FluentFuture() {}
    
      /**
       * Converts the given {@code ListenableFuture} to an equivalent {@code FluentFuture}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 11 19:08:44 GMT 2023
    - 18.7K bytes
    - Viewed (0)
Back to top