Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 50 for CountDownLatch (0.78 sec)

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

        assertTrue(writeLockA.tryLock());
        assertTrue(readLockA.tryLock());
      }
    
      private static class LockingThread extends Thread {
        final CountDownLatch locked = new CountDownLatch(1);
        final CountDownLatch finishLatch = new CountDownLatch(1);
        final Lock lock;
    
        LockingThread(Lock lock) {
          this.lock = lock;
        }
    
        @Override
        public void run() {
          lock.lock();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (1)
  2. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

      }
    
      private static class BlockingCallable implements Callable<@Nullable Void> {
        private final CountDownLatch startLatch = new CountDownLatch(1);
        private final CountDownLatch stopLatch = new CountDownLatch(1);
    
        private volatile boolean running = false;
    
        @Override
        public @Nullable Void call() throws InterruptedException {
          running = true;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

      }
    
      private static class BlockingCallable implements Callable<@Nullable Void> {
        private final CountDownLatch startLatch = new CountDownLatch(1);
        private final CountDownLatch stopLatch = new CountDownLatch(1);
    
        private volatile boolean running = false;
    
        @Override
        public @Nullable Void call() throws InterruptedException {
          running = true;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  4. 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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  5. maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

            }
    
            if (result.getArtifactResolutionNodes() != null) {
                ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    
                CountDownLatch latch =
                        new CountDownLatch(result.getArtifactResolutionNodes().size());
    
                for (ResolutionNode node : result.getArtifactResolutionNodes()) {
                    Artifact artifact = node.getArtifact();
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 24.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

        assertEquals(Service.State.FAILED, service.state());
      }
    
      public void testFailOnErrorFromStartUpListener() throws InterruptedException {
        final Error error = new Error();
        final CountDownLatch latch = new CountDownLatch(1);
        TestService service = new TestService();
        service.addListener(
            new Service.Listener() {
              @Override
              public void running() {
                throw error;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

        dns["san.com"] = Dns.SYSTEM.lookup(server.hostName).subList(0, 1)
        val sanUrl = url.newBuilder().host("san.com").build()
        val latch1 = CountDownLatch(1)
        val latch2 = CountDownLatch(1)
        val latch3 = CountDownLatch(1)
        val latch4 = CountDownLatch(1)
        val listener1: EventListener =
          object : EventListener() {
            override fun connectStart(
              call: Call,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  8. 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() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.9K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

        } catch (e: InterruptedException) {
          Thread.currentThread().interrupt()
        }
      }
    
      private fun cancelLater(
        call: Call,
        delayMillis: Int,
      ): CountDownLatch {
        val latch = CountDownLatch(1)
        Thread {
          sleep(delayMillis)
          if (cancelMode == CANCEL) {
            call.cancel()
          } else {
            threadToCancel!!.interrupt()
          }
          latch.countDown()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

      }
    
      public void testNull() throws Exception {
        new NullPointerTester()
            .setDefault(CountDownLatch.class, new CountDownLatch(0))
            .setDefault(Semaphore.class, new Semaphore(999))
            .testAllPublicStaticMethods(Uninterruptibles.class);
      }
    
      // IncrementableCountDownLatch.await() tests
    
      // CountDownLatch.await() tests
    
      // Condition.await() tests
      public void testConditionAwaitTimeoutExceeded() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
Back to top