Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for timeoutNanos (0.17 sec)

  1. guava/src/com/google/common/util/concurrent/ListenableFutureTask.java

          throws TimeoutException, InterruptedException, ExecutionException {
    
        long timeoutNanos = unit.toNanos(timeout);
        if (timeoutNanos <= OverflowAvoidingLockSupport.MAX_NANOSECONDS_THRESHOLD) {
          return super.get(timeout, unit);
        }
        // Waiting 68 years should be enough for any program.
        return super.get(
            min(timeoutNanos, OverflowAvoidingLockSupport.MAX_NANOSECONDS_THRESHOLD), NANOSECONDS);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/Monitor.java

        long timeoutNanos = unit.toNanos(time);
        return Longs.constrainToRange(timeoutNanos, 0L, (Long.MAX_VALUE / 4) * 3);
      }
    
      /**
       * Returns System.nanoTime() unless the timeout has already elapsed. Returns 0L if and only if the
       * timeout has already elapsed.
       */
      private static long initNanoTime(long timeoutNanos) {
        if (timeoutNanos <= 0L) {
          return 0L;
        } else {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 18:22:01 UTC 2023
    - 42.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java

          throws TimeoutException, InterruptedException, ExecutionException {
    
        long timeoutNanos = unit.toNanos(timeout);
        if (timeoutNanos <= OverflowAvoidingLockSupport.MAX_NANOSECONDS_THRESHOLD) {
          return super.get(timeout, unit);
        }
        // Waiting 68 years should be enough for any program.
        return super.get(
            min(timeoutNanos, OverflowAvoidingLockSupport.MAX_NANOSECONDS_THRESHOLD), NANOSECONDS);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/Monitor.java

       * Caller must have previously sanitized timeoutNanos using toSafeNanos.
       */
      private static long remainingNanos(long startTime, long timeoutNanos) {
        // assert timeoutNanos == 0L || startTime != 0L;
    
        // TODO : NOT CORRECT, BUT TESTS PASS ANYWAYS!
        // if (true) return timeoutNanos;
        // ONLY 2 TESTS FAIL IF WE DO:
        // if (true) return 0;
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 18:22:01 UTC 2023
    - 38.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

      }
    
      @Test
      fun defaultConfigIsNoTimeout() {
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val call = client.newCall(request)
        assertThat(call.timeout().timeoutNanos()).isEqualTo(0)
      }
    
      @Test
      fun configureClientDefault() {
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val timeoutClient =
          client.newBuilder()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt

      private fun readHeader() {
        if (closed) throw IOException("closed")
    
        // Disable the timeout to read the first byte of a new frame.
        val b0: Int
        val timeoutBefore = source.timeout().timeoutNanos()
        source.timeout().clearTimeout()
        try {
          b0 = source.readByte() and 0xff
        } finally {
          source.timeout().timeout(timeoutBefore, TimeUnit.NANOSECONDS)
        }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/MoreExecutors.java

              } else if (active == 0) {
                break;
              } else if (timed) {
                f = futureQueue.poll(timeoutNanos, TimeUnit.NANOSECONDS);
                if (f == null) {
                  throw new TimeoutException();
                }
                long now = System.nanoTime();
                timeoutNanos -= now - lastTime;
                lastTime = now;
              } else {
                f = futureQueue.take();
              }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 15 10:40:05 UTC 2024
    - 43.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

              } else if (active == 0) {
                break;
              } else if (timed) {
                f = futureQueue.poll(timeoutNanos, TimeUnit.NANOSECONDS);
                if (f == null) {
                  throw new TimeoutException();
                }
                long now = System.nanoTime();
                timeoutNanos -= now - lastTime;
                lastTime = now;
              } else {
                f = futureQueue.take();
              }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 15 10:40:05 UTC 2024
    - 39K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

        // NOTE: if timeout < 0, remainingNanos will be < 0 and we will fall into the while(true) loop
        // at the bottom and throw a timeoutexception.
        final long timeoutNanos = unit.toNanos(timeout); // we rely on the implicit null check on unit.
        long remainingNanos = timeoutNanos;
        if (Thread.interrupted()) {
          throw new InterruptedException();
        }
        Object localValue = value;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 63.1K bytes
    - Viewed (1)
  10. guava/src/com/google/common/util/concurrent/AbstractFuture.java

        // NOTE: if timeout < 0, remainingNanos will be < 0 and we will fall into the while(true) loop
        // at the bottom and throw a timeoutexception.
        final long timeoutNanos = unit.toNanos(timeout); // we rely on the implicit null check on unit.
        long remainingNanos = timeoutNanos;
        if (Thread.interrupted()) {
          throw new InterruptedException();
        }
        Object localValue = value;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 62.8K bytes
    - Viewed (1)
Back to top