Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 80 for Cancel (0.17 sec)

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

        // stop it.
        blockingCallable.waitForStart();
    
        // This time, cancel the future for the first task. The task remains running, only the future
        // is cancelled.
        future1.cancel(false);
    
        // Give the second task a chance to (incorrectly) start up while the first task is running.
        // (This is the assertion that fails.)
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        // stop it.
        blockingCallable.waitForStart();
    
        // This time, cancel the future for the first task. The task remains running, only the future
        // is cancelled.
        future1.cancel(false);
    
        // Give the second task a chance to (incorrectly) start up while the first task is running.
        // (This is the assertion that fails.)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. .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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:33:50 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. 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)
  7. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetUnchecked_cancelled() {
        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        try {
          getUnchecked(future);
          fail();
        } catch (CancellationException expected) {
        }
      }
    
      public void testGetUnchecked_ExecutionExceptionChecked() {
        try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        future = service.schedule(runnable, 5, TimeUnit.MINUTES);
        future.cancel(true);
        assertTrue(future.isCancelled());
        delegateFuture = (ScheduledFuture<?>) delegateQueue.element();
        assertTrue(delegateFuture.isCancelled());
    
        delegateQueue.clear();
    
        future = service.scheduleAtFixedRate(runnable, 5, 5, TimeUnit.MINUTES);
        future.cancel(true);
        assertTrue(future.isCancelled());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top