Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for awaitUninterruptibly (0.06 sec)

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

          try {
            return condition.await(time, unit);
          } finally {
            lock.unlock();
          }
        }
    
        @Override
        public void awaitUninterruptibly() {
          lock.lock();
          try {
            condition.awaitUninterruptibly();
          } finally {
            lock.unlock();
          }
        }
    
        @Override
        public long awaitNanos(long nanosTimeout) throws InterruptedException {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/eventbus/DispatcherTest.java

                    }
    
                    dispatcher.dispatch("foo", stringSubscribers.iterator());
                    latch.countDown();
                  }
                })
            .start();
    
        Uninterruptibles.awaitUninterruptibly(latch);
    
        // See Dispatcher.LegacyAsyncDispatcher for an explanation of why there aren't really any
        // useful testable guarantees about the behavior of that dispatcher in a multithreaded
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

       */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
      @IgnoreJRERequirement // Users will use this only if they're already using Duration.
      public static boolean awaitUninterruptibly(CountDownLatch latch, Duration timeout) {
        return awaitUninterruptibly(latch, toNanosSaturated(timeout), TimeUnit.NANOSECONDS);
      }
    
      /**
       * Invokes {@code latch.}{@link CountDownLatch#await(long, TimeUnit) await(timeout, unit)}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 19.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

        @Override
        public void close() throws IOException {
          latch.countDown();
        }
    
        boolean awaitClosed() {
          return awaitUninterruptibly(latch, 10, SECONDS);
        }
    
        boolean stillOpen() {
          return !awaitUninterruptibly(latch, 1, SECONDS);
        }
    
        @Override
        public String toString() {
          return name;
        }
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 75.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/MapMakerTest.java

     */
    
    package com.google.common.collect;
    
    import static com.google.common.collect.ReflectionFreeAssertThrows.assertThrows;
    import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Function;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

              public void run() {
                task.run();
              }
            });
        awaitUninterruptibly(doingCallLatch);
        long hangDelayMillis =
            (expectedOutcome == Outcome.HANG)
                ? EXPECTED_HANG_DELAY_MILLIS
                : UNEXPECTED_HANG_DELAY_MILLIS;
        boolean hung =
            !awaitUninterruptibly(callCompletedLatch, hangDelayMillis, TimeUnit.MILLISECONDS);
        if (hung) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 27K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.MoreExecutors.newSequentialExecutor;
    import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly;
    import static java.util.concurrent.Executors.newCachedThreadPool;
    import static java.util.concurrent.Executors.newSingleThreadExecutor;
    import static java.util.concurrent.TimeUnit.SECONDS;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

                    // to
                    // ensure that the thread running the failure callbacks is not the main thread.
                    Uninterruptibles.awaitUninterruptibly(afterStarted);
                    notifyFailed(new Exception("boom"));
                  }
                }.start();
              }
    
              @Override
              protected void doStop() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 20:34:52 UTC 2025
    - 25.5K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

              // do nothing
            } finally {
              completedIteration.countDown();
            }
          }
        }
    
        void awaitInLoop() {
          Uninterruptibles.awaitUninterruptibly(completedIteration);
        }
      }
    
      private static final class InterruptibleFuture extends AbstractFuture<String> {
        boolean interruptTaskWasCalled;
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

              // do nothing
            } finally {
              completedIteration.countDown();
            }
          }
        }
    
        void awaitInLoop() {
          Uninterruptibles.awaitUninterruptibly(completedIteration);
        }
      }
    
      private static final class InterruptibleFuture extends AbstractFuture<String> {
        boolean interruptTaskWasCalled;
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 46.8K bytes
    - Viewed (0)
Back to top