Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 153 for InterruptedException (0.77 sec)

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

          throws InterruptedException, ExecutionException {
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
        assertTrue(latch.await(5, SECONDS));
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
        assertEquals(expectedValue, future.get());
      }
    
      public void testCancelledFuture() throws InterruptedException, ExecutionException {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java

          this.interruptee = interruptee;
        }
    
        @Override
        public void run() {
          while (true) {
            try {
              Thread.sleep(everyMillis);
            } catch (InterruptedException e) {
              // ok. just stop sleeping.
            }
            if (shouldStop) {
              break;
            }
            interruptee.interrupt();
          }
        }
    
        void stopInterrupting() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      public void testAddDelayedShutdownHook_interrupted() throws InterruptedException {
        TestApplication application = new TestApplication();
        ExecutorService service = mock(ExecutorService.class);
        application.addDelayedShutdownHook(service, 2, SECONDS);
        when(service.awaitTermination(2, SECONDS)).thenThrow(new InterruptedException());
        application.shutdown();
        verify(service).shutdown();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 28K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java

          this.interruptee = interruptee;
        }
    
        @Override
        public void run() {
          while (true) {
            try {
              Thread.sleep(everyMillis);
            } catch (InterruptedException e) {
              // ok. just stop sleeping.
            }
            if (shouldStop) {
              break;
            }
            interruptee.interrupt();
          }
        }
    
        void stopInterrupting() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  5. guava/src/com/google/common/cache/CacheLoader.java

       * @return the value associated with {@code key}; <b>must not be null</b>
       * @throws Exception if unable to load the result
       * @throws InterruptedException if this method is interrupted. {@code InterruptedException} is
       *     treated like any other {@code Exception} in all respects except that, when it is caught,
       *     the thread's interrupt status is set
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/QueuesTest.java

       * be a SynchronousQueue.
       */
      private ExecutorService threadPool;
    
      @Override
      public void setUp() {
        threadPool = newCachedThreadPool();
      }
    
      @Override
      public void tearDown() throws InterruptedException {
        threadPool.shutdown();
        assertTrue("Some worker didn't finish in time", threadPool.awaitTermination(10, SECONDS));
      }
    
      private static <T> int drain(
          BlockingQueue<T> q,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt

        assertThat(exception.message).isEqualTo("canceled due to java.lang.InterruptedException")
        assertThat(exception).isInstanceOf<IOException>()
        assertThat(exception.cause)
          .isNotNull()
          .isInstanceOf<InterruptedException>()
      }
    
      private fun sleep(delayMillis: Int) {
        try {
          Thread.sleep(delayMillis.toLong())
        } catch (e: InterruptedException) {
          Thread.currentThread().interrupt()
        }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/Monitor.java

       *
       * @throws InterruptedException if interrupted while waiting
       */
      public void enterInterruptibly() throws InterruptedException {
        lock.lockInterruptibly();
      }
    
      /**
       * Enters this monitor. Blocks at most the given time, and may be interrupted.
       *
       * @return whether the monitor was entered
       * @throws InterruptedException if interrupted while waiting
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 42.8K bytes
    - Viewed (0)
  9. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Uninterruptibles.java

      @CanIgnoreReturnValue
      public static <V extends @Nullable Object> V getUninterruptibly(Future<V> future)
          throws ExecutionException {
        try {
          return future.get();
        } catch (InterruptedException e) {
          // Should never be thrown in GWT but play it safe
          throw new IllegalStateException(e);
        }
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/TimeLimiter.java

       * @param timeoutUnit with timeoutDuration, the maximum length of time to wait
       * @return the result returned by the Callable
       * @throws TimeoutException if the time limit is reached
       * @throws InterruptedException if the current thread was interrupted during execution
       * @throws ExecutionException if {@code callable} throws a checked exception
       * @throws UncheckedExecutionException if {@code callable} throws a {@code RuntimeException}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Jan 18 02:54:30 UTC 2025
    - 8.2K bytes
    - Viewed (0)
Back to top