Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 81 - 90 of 130 for CountDownLatch (0.16 seconds)

  1. impl/maven-cli/src/main/java/org/apache/maven/cling/transfer/SimplexTransferListener.java

                // nothing, is async
            }
        }
    
        private static class BlockingExchange extends Exchange {
            private final CountDownLatch latch = new CountDownLatch(1);
    
            private BlockingExchange(TransferEvent event) {
                super(event);
            }
    
            @Override
            public void process(Consumer<TransferEvent> consumer) {
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Thu Feb 06 11:28:05 GMT 2025
    - 8.7K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java

            int threadCount = 5; // Reduced complexity
            int operationsPerThread = 10;
            ExecutorService executor = Executors.newFixedThreadPool(threadCount);
            CountDownLatch startLatch = new CountDownLatch(1);
            CountDownLatch endLatch = new CountDownLatch(threadCount);
            AtomicInteger successCount = new AtomicInteger(0);
            List<String> messages = new ArrayList<>();
            List<byte[]> encrypted = new ArrayList<>();
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 44.1K bytes
    - Click Count (0)
  3. src/test/java/jcifs/smb/PreauthIntegrityServiceTest.java

        public void testConcurrentSessionHandling() throws Exception {
            int sessionCount = 10;
            ExecutorService executor = Executors.newFixedThreadPool(5);
            CountDownLatch latch = new CountDownLatch(sessionCount);
    
            for (int i = 0; i < sessionCount; i++) {
                final int sessionIndex = i;
                executor.submit(() -> {
                    try {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 11.1K bytes
    - Click Count (0)
  4. src/test/java/jcifs/internal/witness/WitnessClientTest.java

         * Test notification listener that captures notifications
         */
        private static class TestNotificationListener implements WitnessClient.WitnessNotificationListener {
            private final CountDownLatch notificationLatch = new CountDownLatch(1);
            private volatile WitnessNotification lastNotification;
    
            @Override
            public void onWitnessNotification(WitnessNotification notification) {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 23 09:06:40 GMT 2025
    - 9.8K bytes
    - Click Count (0)
  5. okhttp/src/jvmTest/kotlin/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()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 15.8K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

        public String toString() {
          return name;
        }
      }
    
      static final class Waiter {
        private final CountDownLatch started = new CountDownLatch(1);
        private final CountDownLatch canReturn = new CountDownLatch(1);
        private final CountDownLatch returned = new CountDownLatch(1);
        private Object proxy;
    
        @SuppressWarnings("unchecked") // proxy for a generic class
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 63K bytes
    - Click Count (0)
  7. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

     */
    package mockwebserver3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import java.io.IOException
    import java.net.HttpURLConnection
    import java.util.concurrent.CountDownLatch
    import java.util.concurrent.atomic.AtomicInteger
    import mockwebserver3.junit5.StartStop
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.Timeout
    
    @Timeout(30)
    class CustomDispatcherTest {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 3.2K bytes
    - Click Count (1)
  8. src/test/java/org/codelibs/fess/util/InputStreamThreadTest.java

                largeInput.append("Line number ").append(i).append("\n");
            }
    
            InputStream is = new ByteArrayInputStream(largeInput.toString().getBytes(StandardCharsets.UTF_8));
    
            CountDownLatch latch = new CountDownLatch(1);
            List<String> receivedLines = new ArrayList<>();
            Consumer<String> callback = line -> {
                receivedLines.add(line);
                if (receivedLines.size() == 5000) {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sun Jan 11 08:43:05 GMT 2026
    - 12K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

          barrier.await(1, SECONDS);
        } finally {
          service.shutdown();
        }
      }
    
      public void testRejectedExecutionThrownWithMultipleCalls() throws Exception {
        CountDownLatch latch = new CountDownLatch(1);
        SettableFuture<?> future = SettableFuture.create();
        Executor delegate =
            new Executor() {
              @Override
              public void execute(Runnable task) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 10.5K bytes
    - Click Count (0)
  10. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

        assertThat(map).hasSize(1);
      }
    
      public void testCopyEntry_computing() {
        CountDownLatch startSignal = new CountDownLatch(1);
        CountDownLatch computingSignal = new CountDownLatch(1);
        CountDownLatch doneSignal = new CountDownLatch(2);
        Object computedObject = new Object();
    
        CacheLoader<Object, Object> loader =
            new CacheLoader<Object, Object>() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 114.9K bytes
    - Click Count (0)
Back to Top