Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 89 for cancel (0.18 sec)

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

        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetCheckedUntimed_cancelled() throws TwoArgConstructorException {
        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        assertThrows(
            CancellationException.class, () -> getChecked(future, TwoArgConstructorException.class));
      }
    
      public void testGetCheckedUntimed_ExecutionExceptionChecked() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

              // Note: The only way this CAS could fail is if cancel() has raced with us. That is ok.
              boolean unused = ATOMIC_HELPER.casValue(this, valueToSet, failure);
            }
            return true;
          }
          localValue = value; // we lost the cas, fall through and maybe cancel
        }
        // The future has already been set to something. If it is cancellation we should cancel the
        // incoming future.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  3. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  4. 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)
  5. android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java

          valueAndCloser.closeAsync();
        }
        super.waitUntilClosed(closingFuture);
      }
    
      @Override
      void cancelFinalStepAndWait(ClosingFuture<TestCloseable> closingFuture) {
        assertThat(closingFuture.cancel(false)).isTrue();
        ValueAndCloser<?> unused = finishToValueAndCloser(closingFuture);
        waitUntilClosed(closingFuture);
        futureCancelled.countDown();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        orig.cancel(true);
        assertTrue(orig.isCancelled());
        assertTrue(prev.isCancelled());
        assertTrue(prev.wasInterrupted());
      }
    
      public void testSetFutureSelf_cancel() {
        SettableFuture<String> orig = SettableFuture.create();
        orig.setFuture(orig);
        orig.cancel(true);
        assertTrue(orig.isCancelled());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  7. 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)
  8. guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

        } catch (TimeoutException expected) {
        } finally {
          latch.countDown();
        }
      }
    
      /**
       * Tests that a canceled future throws a cancellation exception.
       *
       * <p>This method checks the cancel, isCancelled, and isDone methods.
       */
      public void testCanceledFutureThrowsCancellation() throws Exception {
    
        assertFalse(future.isDone());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

        step2Waiter.awaitStarted();
    
        // Everything should still be open.
        assertStillOpen(closeable1, closeable2, closeable3, closeable4);
    
        // Cancel step 3, resume step 2, and pause in step 4.
        assertWithMessage("step3.cancel()").that(step3.cancel(false)).isTrue();
        step2Waiter.awaitReturned();
        step4Waiter.awaitStarted();
    
        // Step 1 is not cancelled because it was done.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

        }
    
        @Override
        public boolean isCancelled() {
          return sync.isCancelled();
        }
    
        @CanIgnoreReturnValue
        @Override
        public boolean cancel(boolean mayInterruptIfRunning) {
          if (!sync.cancel(mayInterruptIfRunning)) {
            return false;
          }
          executionList.execute();
          if (mayInterruptIfRunning) {
            interruptTask();
          }
          return true;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 13.6K bytes
    - Viewed (0)
Back to top