Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 74 for countdown (0.08 sec)

  1. okhttp/src/main/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

            .addNetworkInterceptor(
              Interceptor { chain ->
                try {
                  chain.proceed(chain.request())
                } finally {
                  firstConnectLatch.countDown()
                }
              },
            )
            .build()
    
        // Set up a same-connection retry.
        serverIpv4.enqueue(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. 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)
  5. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  6. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 56.9K bytes
    - Viewed (0)
  7. android/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

      @Param Impl impl;
    
      @Param({"1", "5", "10"})
      int numListeners;
    
      private final Runnable listener =
          new Runnable() {
            @Override
            public void run() {
              listenerLatch.countDown();
            }
          };
    
      @BeforeExperiment
      void setUp() throws Exception {
        executorService =
            new ThreadPoolExecutor(
                NUM_THREADS,
                NUM_THREADS,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CallTest.kt

        listener =
          object : RecordingEventListener() {
            override fun requestHeadersEnd(
              call: Call,
              request: Request,
            ) {
              requestFinished.countDown()
              super.responseHeadersStart(call)
            }
          }
        client =
          client.newBuilder()
            .dns(DoubleInetAddressDns())
            .eventListenerFactory(clientTestRule.wrap(listener))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

              connection: Http2Connection,
              settings: Settings,
            ) {
              maxConcurrentStreams.set(settings.getMaxConcurrentStreams())
              maxConcurrentStreamsUpdated.countDown()
            }
          }
        val connection = connect(peer, IGNORE, listener)
        connection.withLock {
          assertThat(connection.peerSettings.getMaxConcurrentStreams()).isEqualTo(10)
        }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 75.4K bytes
    - Viewed (0)
Back to top