Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 226 for poll (0.19 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. guava-tests/test/com/google/common/util/concurrent/TestThread.java

        sendRequest(methodName, arguments);
        Thread.sleep(DUE_DILIGENCE_MILLIS);
        assertEquals(true, invokeMethod("hasQueuedThread", this));
        assertNull(responseQueue.poll());
      }
    
      /**
       * Causes this thread to call the named method, and asserts that this thread thereby waits on the
       * given condition-like object. The lock-like object must have a method equivalent to {@link
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

      @Override
      public @Nullable E poll() {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.poll();
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public @Nullable E poll(long timeout, TimeUnit unit) throws InterruptedException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 19.5K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

      @Override
      public @Nullable E poll() {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.poll();
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public @Nullable E poll(long timeout, TimeUnit unit) throws InterruptedException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 19.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        assertEquals(1, (int) mmHeap.peek());
        assertEquals(1, (int) mmHeap.poll());
        assertEquals(3, (int) mmHeap.peekLast());
        assertEquals(2, (int) mmHeap.peek());
        assertEquals(2, (int) mmHeap.poll());
        assertEquals(3, (int) mmHeap.peekLast());
        assertEquals(3, (int) mmHeap.peek());
        assertEquals(3, (int) mmHeap.poll());
        assertNull(mmHeap.peekLast());
        assertNull(mmHeap.peek());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/TestThread.java

        sendRequest(methodName, arguments);
        Thread.sleep(DUE_DILIGENCE_MILLIS);
        assertEquals(true, invokeMethod("hasQueuedThread", this));
        assertNull(responseQueue.poll());
      }
    
      /**
       * Causes this thread to call the named method, and asserts that this thread thereby waits on the
       * given condition-like object. The lock-like object must have a method equivalent to {@link
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        assertEquals(1, (int) mmHeap.peek());
        assertEquals(1, (int) mmHeap.poll());
        assertEquals(3, (int) mmHeap.peekLast());
        assertEquals(2, (int) mmHeap.peek());
        assertEquals(2, (int) mmHeap.poll());
        assertEquals(3, (int) mmHeap.peekLast());
        assertEquals(3, (int) mmHeap.peek());
        assertEquals(3, (int) mmHeap.poll());
        assertNull(mmHeap.peekLast());
        assertNull(mmHeap.peek());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

      @CanIgnoreReturnValue
      @Override
      public @Nullable E poll() {
        final Monitor monitor = this.monitor;
        if (monitor.enterIf(notEmpty)) {
          try {
            return extract();
          } finally {
            monitor.leave();
          }
        } else {
          return null;
        }
      }
    
      @CanIgnoreReturnValue
      @Override
      public @Nullable E poll(long timeout, TimeUnit unit) throws InterruptedException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

     *     .maximumSize(1000)
     *     .create();
     * }</pre>
     *
     * <p>As a {@link Queue} it functions exactly as a {@link PriorityQueue}: its head element -- the
     * implicit target of the methods {@link #peek()}, {@link #poll()} and {@link #remove()} -- is
     * defined as the <i>least</i> element in the queue according to the queue's comparator. But unlike
     * a regular priority queue, the methods {@link #peekLast}, {@link #pollLast} and {@link
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
Back to top