Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 7 of 7 for runWithTimeout (0.09 seconds)

  1. android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

        return callWithTimeout(callable, timeoutDuration, timeoutUnit);
      }
    
      @Override
      @SuppressWarnings("CatchingUnchecked") // sneaky checked exception
      public void runWithTimeout(Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit) {
        checkNotNull(runnable);
        checkNotNull(timeoutUnit);
        try {
          runnable.run();
        } catch (Exception e) { // sneaky checked exception
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 3.6K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/util/concurrent/TimeLimiter.java

       * @throws UncheckedExecutionException if {@code runnable} throws a {@code RuntimeException}
       * @throws ExecutionError if {@code runnable} throws an {@code Error}
       * @since 22.0
       */
      void runWithTimeout(Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit)
          throws TimeoutException, InterruptedException;
    
      /**
       * Invokes a specified Runnable, timing out after the specified time limit. If the target method
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Jan 18 02:54:30 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

          throw e;
        } catch (ExecutionException e) {
          wrapAndThrowExecutionExceptionOrError(e.getCause());
          throw new AssertionError();
        }
      }
    
      @Override
      public void runWithTimeout(Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit)
          throws TimeoutException, InterruptedException {
        checkNotNull(runnable);
        checkNotNull(timeoutUnit);
        checkPositiveTimeout(timeoutDuration);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Sep 08 18:35:13 GMT 2025
    - 9.6K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

        service.runWithTimeout(GOOD_RUNNABLE, ENOUGH_MS, MILLISECONDS);
    
        assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(DELAY_MS, ENOUGH_MS));
      }
    
      public void testRunWithTimeout_goodRunnableWithNotEnoughTime() throws Exception {
        assertThrows(
            TimeoutException.class,
            () -> service.runWithTimeout(GOOD_RUNNABLE, NOT_ENOUGH_MS, MILLISECONDS));
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 9.4K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

        timeLimiter.runWithTimeout(Runnables.doNothing(), DELAY_MS, MILLISECONDS);
      }
    
      public void testRunWithTimeout_wrapsUncheckedException() throws Exception {
        RuntimeException exception = new RuntimeException("test");
        UncheckedExecutionException e =
            assertThrows(
                UncheckedExecutionException.class,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

        timeLimiter.runWithTimeout(Runnables.doNothing(), DELAY_MS, MILLISECONDS);
      }
    
      public void testRunWithTimeout_wrapsUncheckedException() throws Exception {
        RuntimeException exception = new RuntimeException("test");
        UncheckedExecutionException e =
            assertThrows(
                UncheckedExecutionException.class,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

        service.runWithTimeout(GOOD_RUNNABLE, ENOUGH_MS, MILLISECONDS);
    
        assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(DELAY_MS, ENOUGH_MS));
      }
    
      public void testRunWithTimeout_goodRunnableWithNotEnoughTime() throws Exception {
        assertThrows(
            TimeoutException.class,
            () -> service.runWithTimeout(GOOD_RUNNABLE, NOT_ENOUGH_MS, MILLISECONDS));
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 9.4K bytes
    - Click Count (0)
Back to Top