Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 150 for poll (0.16 sec)

  1. android/guava/src/com/google/common/collect/Queues.java

        while (added < numElements) {
          // we could rely solely on #poll, but #drainTo might be more efficient when there are multiple
          // elements already available (e.g. LinkedBlockingQueue#drainTo locks only once)
          added += q.drainTo(buffer, numElements - added);
          if (added < numElements) { // not enough elements immediately available; will have to poll
            E e = q.poll(deadline - System.nanoTime(), TimeUnit.NANOSECONDS);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 16K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

       * like [poll]. It is only usable within task faker tasks.
       */
      private inner class TaskFakerBlockingQueue<T>(
        val delegate: BlockingQueue<T>,
      ) : AbstractQueue<T>(), BlockingQueue<T> {
        override val size: Int = delegate.size
    
        private var editCount = 0
    
        override fun poll(): T = delegate.poll()
    
        override fun poll(
          timeout: Long,
          unit: TimeUnit,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  3. doc/next/6-stdlib/1-time.md

    making it difficult to use `Reset` and `Stop` correctly.
    A visible effect of this change is that `len` and `cap` of timer channels
    now returns 0 instead of 1, which may affect programs that
    poll the length to decide whether a receive on the timer channel
    will succeed.
    Such code should use a non-blocking receive instead.
    
    These new behaviors are only enabled when the main Go program
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

        synchronized(this@RealWebSocket) {
          if (failed) {
            return false // Failed web socket.
          }
    
          writer = this.writer
          pong = pongQueue.poll()
          if (pong == null) {
            messageOrClose = messageAndCloseQueue.poll()
            if (messageOrClose is Close) {
              receivedCloseCode = this.receivedCloseCode
              receivedCloseReason = this.receivedCloseReason
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

          while (true) {
            Future<T> f = futureQueue.poll();
            if (f == null) {
              if (ntasks > 0) {
                --ntasks;
                futures.add(submitAndAddQueueListener(executorService, it.next(), futureQueue));
                ++active;
              } else if (active == 0) {
                break;
              } else if (timed) {
                f = futureQueue.poll(timeoutNanos, TimeUnit.NANOSECONDS);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

        )
    
        taskFaker.assertNoMoreTasks()
      }
    
      /**
       * This test causes two connections to become available simultaneously, one from a TCP connect and
       * one from the pool. We must take the pooled connection because by taking it from the pool, we've
       * fully acquired it.
       *
       * This test yields threads to force the decision of plan1 to be deliberate and not lucky. In
       * particular, we set up this sequence of events:
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

          }
        }
    
        @GuardedBy("this")
        void drainKeyReferenceQueue(ReferenceQueue<K> keyReferenceQueue) {
          Reference<? extends K> ref;
          int i = 0;
          while ((ref = keyReferenceQueue.poll()) != null) {
            @SuppressWarnings("unchecked")
            E entry = (E) ref;
            map.reclaimKey(entry);
            if (++i == DRAIN_MAX) {
              break;
            }
          }
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 91.9K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

         * not in {@link #nextElements}, this method throws an {@link UnknownElementException}.
         *
         * <p>This method is used when testing iterators without a known ordering. We poll the target
         * iterator's next element and pass it to the reference iterator through this method so it can
         * return the same element. This enables the assertion to pass and the reference iterator to
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

         * not in {@link #nextElements}, this method throws an {@link UnknownElementException}.
         *
         * <p>This method is used when testing iterators without a known ordering. We poll the target
         * iterator's next element and pass it to the reference iterator through this method so it can
         * return the same element. This enables the assertion to pass and the reference iterator to
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Synchronized.java

        public E peek() {
          synchronized (mutex) {
            return delegate().peek();
          }
        }
    
        @Override
        @CheckForNull
        public E poll() {
          synchronized (mutex) {
            return delegate().poll();
          }
        }
    
        @Override
        public E remove() {
          synchronized (mutex) {
            return delegate().remove();
          }
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 53.4K bytes
    - Viewed (0)
Back to top