Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 79 for countDown (0.1 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt

        s: String,
        responseSent: CountDownLatch = CountDownLatch(0),
      ) = apply {
        actions += { stream ->
          stream.responseBody.writeUtf8(s)
          stream.responseBody.flush()
          responseSent.countDown()
        }
      }
    
      fun exhaustResponse() =
        apply {
          actions += { stream -> stream.responseBody.close() }
        }
    
      fun sleep(
        duration: Long,
        unit: TimeUnit,
      ) = apply {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToFutureTest.java

      }
    
      @Override
      void cancelFinalStepAndWait(ClosingFuture<TestCloseable> closingFuture) {
        assertThat(closingFuture.finishToFuture().cancel(false)).isTrue();
        waitUntilClosed(closingFuture);
        futureCancelled.countDown();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

          running = true;
          startLatch.countDown();
          stopLatch.await();
          running = false;
          return null;
        }
    
        public void waitForStart() throws InterruptedException {
          startLatch.await();
        }
    
        public void stop() {
          stopLatch.countDown();
        }
    
        public boolean isRunning() {
          return running;
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

          synchronized(this) {
            this.publicSuffixListBytes = publicSuffixListBytes!!
            this.publicSuffixExceptionListBytes = publicSuffixExceptionListBytes!!
          }
        } finally {
          readCompleteLatch.countDown()
        }
      }
    
      /** Visible for testing. */
      fun setListBytes(
        publicSuffixListBytes: ByteArray,
        publicSuffixExceptionListBytes: ByteArray,
      ) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  5. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  6. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/SimplexTransferListener.java

                super(event);
            }
    
            @Override
            public void process(Consumer<TransferEvent> consumer) {
                super.process(consumer);
                latch.countDown();
            }
    
            @Override
            public void waitForProcessed() throws InterruptedException {
                latch.await();
            }
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  8. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  9. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  10. android/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top