Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 84 for CountDownLatch (0.13 sec)

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

          barrier.await(1, SECONDS);
        } finally {
          service.shutdown();
        }
      }
    
      public void testRejectedExecutionThrownWithMultipleCalls() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        final SettableFuture<?> future = SettableFuture.create();
        final Executor delegate =
            new Executor() {
              @Override
              public void execute(Runnable task) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/suggest/concurrent/Deferred.java

        private final Queue<Consumer<RESPONSE>> doneCallbacks = new LinkedBlockingQueue<>();
    
        private final Queue<Consumer<Throwable>> errorCallbacks = new LinkedBlockingQueue<>();
    
        private final CountDownLatch latch = new CountDownLatch(1);
    
        public void resolve(final RESPONSE r) {
            final ArrayList<Consumer<RESPONSE>> executeCallbacks;
            synchronized (Deferred.this) {
                if (response != null || error != null) {
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      // methods is identical, save for method being invoked.
    
      /** Invokes {@code latch.}{@link CountDownLatch#await() await()} uninterruptibly. */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
      public static void awaitUninterruptibly(CountDownLatch latch) {
        boolean interrupted = false;
        try {
          while (true) {
            try {
              latch.await();
              return;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

        assertEquals(1, map.size());
      }
    
      public void testCopyEntry_computing() {
        final CountDownLatch startSignal = new CountDownLatch(1);
        final CountDownLatch computingSignal = new CountDownLatch(1);
        final CountDownLatch doneSignal = new CountDownLatch(2);
        final Object computedObject = new Object();
    
        final CacheLoader<Object, Object> loader =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/LocalCacheTest.java

        assertTrue(notifications.toString(), notifications.isEmpty());
      }
    
      public void testCopyEntry_computing() {
        final CountDownLatch startSignal = new CountDownLatch(1);
        final CountDownLatch computingSignal = new CountDownLatch(1);
        final CountDownLatch doneSignal = new CountDownLatch(2);
        final Object computedObject = new Object();
    
        final CacheLoader<Object, Object> loader =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

       * even permanently blocked.
       */
      public void testListenerDeadlock() throws InterruptedException {
        final CountDownLatch failEnter = new CountDownLatch(1);
        final CountDownLatch failLeave = new CountDownLatch(1);
        final CountDownLatch afterStarted = new CountDownLatch(1);
        Service failRunService =
            new AbstractService() {
              @Override
              protected void doStart() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

          delayNanos,
        )
      }
    
      /** Returns a latch that reaches 0 when the queue is next idle. */
      fun idleLatch(): CountDownLatch {
        taskRunner.lock.withLock {
          // If the queue is already idle, that's easy.
          if (activeTask == null && futureTasks.isEmpty()) {
            return CountDownLatch(0)
          }
    
          // If there's an existing AwaitIdleTask, use it. This is necessary when the executor is
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/QueuesTest.java

        }
      }
    
      private static class Producer implements Callable<@Nullable Void> {
        final BlockingQueue<Object> q;
        final int elements;
        final CountDownLatch beganProducing = new CountDownLatch(1);
        final CountDownLatch doneProducing = new CountDownLatch(1);
    
        Producer(BlockingQueue<Object> q, int elements) {
          this.q = q;
          this.elements = elements;
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

    import assertk.assertions.isNotNull
    import assertk.assertions.isTrue
    import java.io.IOException
    import java.io.InterruptedIOException
    import java.net.HttpURLConnection
    import java.time.Duration
    import java.util.concurrent.CountDownLatch
    import java.util.concurrent.TimeUnit
    import java.util.concurrent.atomic.AtomicReference
    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        assertThat(dispatcher.queuedCalls())
          .containsExactlyInAnyOrder(a4, a5)
      }
    
      @Test
      fun synchronousCallAccessors() {
        val ready = CountDownLatch(2)
        val waiting = CountDownLatch(1)
        client =
          client.newBuilder()
            .addInterceptor(
              Interceptor { chain: Interceptor.Chain? ->
                try {
                  ready.countDown()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top