Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 70 for CountDown (0.05 sec)

  1. android/guava-tests/test/com/google/common/collect/QueuesTest.java

        }
    
        @Override
        public @Nullable Void call() throws InterruptedException {
          try {
            beganProducing.countDown();
            for (int i = 0; i < elements; i++) {
              q.put(new Object());
            }
            return null;
          } finally {
            doneProducing.countDown();
          }
        }
      }
    
      private static class Interrupter implements Runnable {
        final Thread threadToInterrupt;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

        Thread thread =
            new Thread() {
              @Override
              public void run() {
                try {
                  cacheRef.get().getUnchecked(3);
                } finally {
                  doneSignal.countDown();
                }
              }
            };
        thread.setUncaughtExceptionHandler(
            new UncaughtExceptionHandler() {
              @Override
              public void uncaughtException(Thread t, Throwable e) {}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

              response: Response,
            ) {
              bodies.add(response.body.string())
              latch.countDown()
            }
    
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              errors.add(e)
              latch.countDown()
            }
          }
        client.newCall(Request.Builder().url(server.url("/")).build()).enqueue(
          callback,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 73.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

                      started.countDown();
                      try {
                        return method.invoke(delegate, args);
                      } catch (InvocationTargetException e) {
                        throw e.getCause();
                      } finally {
                        awaitUninterruptibly(canReturn);
                        returned.countDown();
                      }
                    }
    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. okhttp/src/jvmTest/kotlin/okhttp3/FastFallbackTest.kt

            .addNetworkInterceptor(
              Interceptor { chain ->
                try {
                  chain.proceed(chain.request())
                } finally {
                  firstConnectLatch.countDown()
                }
              },
            ).build()
    
        // Set up a same-connection retry.
        serverIpv4.enqueue(
          MockResponse
            .Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

                  }
                });
        future.get(10, SECONDS);
        assertThrows(RejectedExecutionException.class, () -> executor.execute(Runnables.doNothing()));
        latch.countDown();
        ExecutionException expected =
            assertThrows(ExecutionException.class, () -> first.get(10, SECONDS));
        assertThat(expected).hasCauseThat().isInstanceOf(RejectedExecutionException.class);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              completionLatch.countDown()
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              response.close()
              completionLatch.countDown()
            }
          }
        call.enqueue(callback)
        completionLatch.await()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 60.4K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/fess/job/ExecJobTest.java

                    execJob.jvmOptions("-Xmx" + i + "m");
                }
                latch.countDown();
            });
    
            Thread t2 = new Thread(() -> {
                for (int i = 0; i < 100; i++) {
                    execJob.jvmOptions("-Xms" + i + "m");
                }
                latch.countDown();
            });
    
            t1.start();
            t2.start();
    
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 24.5K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/CancelTest.kt

        val latch = CountDownLatch(1)
        Thread {
          sleep(delayMillis)
          if (cancelMode == CANCEL) {
            call.cancel()
          } else {
            threadToCancel!!.interrupt()
          }
          latch.countDown()
        }.apply { start() }
        return latch
      }
    
      companion object {
        // The size of the socket buffers in bytes.
        private const val SOCKET_BUFFER_SIZE = 256 * 1024
      }
    }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        ScheduledThreadPoolExecutor delegate =
            new ScheduledThreadPoolExecutor(1) {
              @Override
              protected void afterExecute(Runnable r, Throwable t) {
                completed.countDown();
              }
            };
        ListeningScheduledExecutorService service = listeningDecorator(delegate);
        ListenableFuture<Integer> future = service.schedule(Callables.returning(42), 1, MILLISECONDS);
    
        /*
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 28K bytes
    - Viewed (0)
Back to top