Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for runUninterruptiblyWithTimeout (0.15 sec)

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

        RuntimeException exception = new RuntimeException("test");
        UncheckedExecutionException e =
            assertThrows(
                UncheckedExecutionException.class,
                () ->
                    timeLimiter.runUninterruptiblyWithTimeout(
                        runnableThrowing(exception), DELAY_MS, MILLISECONDS));
        assertThat(e.getCause()).isEqualTo(exception);
      }
    
      public static <T> Callable<T> callableThrowing(final Exception 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. android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

            TimeoutException.class,
            () -> service.runUninterruptiblyWithTimeout(GOOD_RUNNABLE, NOT_ENOUGH_MS, MILLISECONDS));
      }
    
      public void testRunUninterruptiblyWithTimeout_badRunnableWithEnoughTime() throws Exception {
        UncheckedExecutionException expected =
            assertThrows(
                UncheckedExecutionException.class,
                () -> service.runUninterruptiblyWithTimeout(BAD_RUNNABLE, 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)
  3. guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

        RuntimeException exception = new RuntimeException("test");
        UncheckedExecutionException e =
            assertThrows(
                UncheckedExecutionException.class,
                () ->
                    timeLimiter.runUninterruptiblyWithTimeout(
                        runnableThrowing(exception), DELAY_MS, MILLISECONDS));
        assertThat(e.getCause()).isEqualTo(exception);
      }
    
      public static <T> Callable<T> callableThrowing(final Exception exception) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

        } catch (Exception e) { // sneaky checked exception
          throw new UncheckedExecutionException(e);
        } catch (Error e) {
          throw new ExecutionError(e);
        }
      }
    
      @Override
      public void runUninterruptiblyWithTimeout(
          Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit) {
        runWithTimeout(runnable, timeoutDuration, timeoutUnit);
      }
    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. guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

        } catch (Exception e) { // sneaky checked exception
          throw new UncheckedExecutionException(e);
        } catch (Error e) {
          throw new ExecutionError(e);
        }
      }
    
      @Override
      public void runUninterruptiblyWithTimeout(
          Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit) {
        runWithTimeout(runnable, timeoutDuration, timeoutUnit);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Dec 14 20:35:03 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/TimeLimiter.java

       * @throws ExecutionError if {@code runnable} throws an {@code Error}
       * @since 28.0
       */
      default void runUninterruptiblyWithTimeout(Runnable runnable, Duration timeout)
          throws TimeoutException {
        runUninterruptiblyWithTimeout(runnable, 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