Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 84 for CountDown (0.87 sec)

  1. src/test/java/jcifs/internal/smb2/Smb2SigningDigestTest.java

                            Thread.currentThread().interrupt();
                        } finally {
                            endLatch.countDown();
                        }
                    });
                }
    
                startLatch.countDown(); // Start all threads
                boolean completed = endLatch.await(10, TimeUnit.SECONDS);
                executor.shutdown();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 43.7K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt

      fun sendResponse(
        s: String,
        responseSent: CountDownLatch = CountDownLatch(1),
      ) = apply {
        actions += { stream ->
          stream.sink.writeUtf8(s)
          stream.sink.flush()
          responseSent.countDown()
        }
      }
    
      fun exhaustResponse() =
        apply {
          actions += { stream -> stream.sink.close() }
        }
    
      fun sleep(
        duration: Long,
        unit: TimeUnit,
      ) = apply {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

        this.countDownLatch = new CountDownLatch(1);
        this.future = future;
    
        future.addListener(this, directExecutor());
      }
    
      @Override
      public void run() {
        countDownLatch.countDown();
      }
    
      /**
       * Verify that the listener completes in a reasonable amount of time, and Asserts that the future
       * returns the expected data.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri May 12 18:12:42 UTC 2023
    - 3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        this.latch = new CountDownLatch(1);
      }
    
      public void setUp() {
        future.addListener(
            new Runnable() {
              @Override
              public void run() {
                latch.countDown();
              }
            },
            exec);
    
        assertEquals(1, latch.getCount());
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
      }
    
      public void tearDown() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        abstract void doAction();
      }
    
      private static class CountDown extends DelayedActionRunnable {
        private final CountDownLatch latch;
    
        CountDown(CountDownLatch latch, long tMinus) {
          super(tMinus);
          this.latch = latch;
        }
    
        @Override
        protected void doAction() {
          latch.countDown();
        }
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java

                    } catch (Exception e) {
                        e.printStackTrace();
                    } finally {
                        endLatch.countDown();
                    }
                });
            }
    
            // Start all threads simultaneously
            startLatch.countDown();
    
            // Wait for completion
            assertTrue(endLatch.await(10, TimeUnit.SECONDS), "All threads should complete within timeout");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 44.1K bytes
    - Viewed (0)
  7. 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)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

          return newTask.latch
        }
      }
    
      private class AwaitIdleTask : Task("$okHttpName awaitIdle", cancelable = false) {
        val latch = CountDownLatch(1)
    
        override fun runOnce(): Long {
          latch.countDown()
          return -1L
        }
      }
    
      /** Adds [task] to run in [delayNanos]. Returns true if the coordinator is impacted. */
      internal fun scheduleAndDecide(
        task: Task,
        delayNanos: Long,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/witness/WitnessClientTest.java

            @Override
            public void onWitnessNotification(WitnessNotification notification) {
                this.lastNotification = notification;
                notificationLatch.countDown();
            }
    
            @Override
            public void onRegistrationFailed(WitnessRegistration registration, Exception error) {
                // Test implementation
            }
    
            @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 09:06:40 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/PreauthIntegrityServiceTest.java

                    } catch (Exception e) {
                        fail("Concurrent session handling failed: " + e.getMessage());
                    } finally {
                        latch.countDown();
                    }
                });
            }
    
            assertTrue(latch.await(10, TimeUnit.SECONDS));
            executor.shutdown();
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
Back to top