Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for callWithTimeout (0.19 sec)

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

        super.setUp();
        timeLimiter = new FakeTimeLimiter();
      }
    
      public void testCallWithTimeout_propagatesReturnValue() throws Exception {
        String result =
            timeLimiter.callWithTimeout(Callables.returning(RETURN_VALUE), DELAY_MS, MILLISECONDS);
    
        assertThat(result).isEqualTo(RETURN_VALUE);
      }
    
      public void testCallWithTimeout_wrapsCheckedException() throws Exception {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

        super.setUp();
        timeLimiter = new FakeTimeLimiter();
      }
    
      public void testCallWithTimeout_propagatesReturnValue() throws Exception {
        String result =
            timeLimiter.callWithTimeout(Callables.returning(RETURN_VALUE), DELAY_MS, MILLISECONDS);
    
        assertThat(result).isEqualTo(RETURN_VALUE);
      }
    
      public void testCallWithTimeout_wrapsCheckedException() throws Exception {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

        checkNotNull(timeoutUnit);
        return target; // ha ha
      }
    
      @CanIgnoreReturnValue // TODO(kak): consider removing this
      @Override
      @ParametricNullness
      public <T extends @Nullable Object> T callWithTimeout(
          Callable<T> callable, long timeoutDuration, TimeUnit timeoutUnit) throws ExecutionException {
        checkNotNull(callable);
        checkNotNull(timeoutUnit);
        try {
          return callable.call();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Dec 14 20:35:03 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

        checkNotNull(timeoutUnit);
        return target; // ha ha
      }
    
      @CanIgnoreReturnValue // TODO(kak): consider removing this
      @Override
      @ParametricNullness
      public <T extends @Nullable Object> T callWithTimeout(
          Callable<T> callable, long timeoutDuration, TimeUnit timeoutUnit) throws ExecutionException {
        checkNotNull(callable);
        checkNotNull(timeoutUnit);
        try {
          return callable.call();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Dec 14 20:35:03 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

        assertThrows(
            TimeoutException.class,
            () -> service.callWithTimeout(GOOD_CALLABLE, NOT_ENOUGH_MS, MILLISECONDS));
      }
    
      public void testCallWithTimeout_badCallableWithEnoughTime() throws Exception {
        ExecutionException expected =
            assertThrows(
                ExecutionException.class,
                () -> service.callWithTimeout(BAD_CALLABLE, ENOUGH_MS, MILLISECONDS));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/TimeLimiter.java

       * @since 28.0
       */
      @CanIgnoreReturnValue
      @ParametricNullness
      default <T extends @Nullable Object> T callWithTimeout(Callable<T> callable, Duration timeout)
          throws TimeoutException, InterruptedException, ExecutionException {
        return callWithTimeout(callable, toNanosSaturated(timeout), TimeUnit.NANOSECONDS);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 18:32:03 UTC 2023
    - 15.3K bytes
    - Viewed (0)
Back to top