Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 84 for InterruptedException (0.17 sec)

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

       * timeoutMillis()}.
       */
      void assertThreadStaysAlive(Thread thread) throws InterruptedException {
        assertThreadStaysAlive(thread, timeoutMillis());
      }
    
      /** Checks that thread does not terminate within the given millisecond delay. */
      void assertThreadStaysAlive(Thread thread, long millis) throws InterruptedException {
        // No need to optimize the failing case via Thread.join.
        delay(millis);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

            throws InterruptedException {
          lastMethodCalled = "invokeAll";
          assertTaskWrapped(tasks);
          return inline.invokeAll(tasks);
        }
    
        @Override
        public <T> List<Future<T>> invokeAll(
            Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
            throws InterruptedException {
          assertTaskWrapped(tasks);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

        protected OldAbstractFuture() {}
    
        /*
         * Improve the documentation of when InterruptedException is thrown. Our
         * behavior matches the JDK's, but the JDK's documentation is misleading.
         */
        /**
         * {@inheritDoc}
         *
         * <p>The default {@link AbstractFuture} implementation throws {@code InterruptedException} if
         * the current thread is interrupted before or during the call, even if the value is already
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      public static void awaitUninterruptibly(CountDownLatch latch) {
        boolean interrupted = false;
        try {
          while (true) {
            try {
              latch.await();
              return;
            } catch (InterruptedException e) {
              interrupted = true;
            }
          }
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  6. compat/maven-embedder/src/test/java/org/apache/maven/cli/transfer/SimplexTransferListenerTest.java

    import org.junit.jupiter.api.Test;
    import org.mockito.Mockito;
    
    import static org.junit.jupiter.api.Assertions.assertThrows;
    
    class SimplexTransferListenerTest {
        @Test
        void cancellation() throws InterruptedException {
            TransferListener delegate = new TransferListener() {
                @Override
                public void transferInitiated(TransferEvent event) throws TransferCancelledException {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       * timeoutMillis()}.
       */
      void assertThreadStaysAlive(Thread thread) throws InterruptedException {
        assertThreadStaysAlive(thread, timeoutMillis());
      }
    
      /** Checks that thread does not terminate within the given millisecond delay. */
      void assertThreadStaysAlive(Thread thread, long millis) throws InterruptedException {
        // No need to optimize the failing case via Thread.join.
        delay(millis);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      public static void awaitUninterruptibly(CountDownLatch latch) {
        boolean interrupted = false;
        try {
          while (true) {
            try {
              latch.await();
              return;
            } catch (InterruptedException e) {
              interrupted = true;
            }
          }
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

            throws InterruptedException {
          lastMethodCalled = "invokeAll";
          assertTaskWrapped(tasks);
          return inline.invokeAll(tasks);
        }
    
        @Override
        public <T> List<Future<T>> invokeAll(
            Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
            throws InterruptedException {
          assertTaskWrapped(tasks);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  10. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top