Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 244 for poll (0.15 sec)

  1. guava-testlib/src/com/google/common/collect/testing/testers/QueuePollTester.java

      public void testPoll_empty() {
        assertNull("emptyQueue.poll() should return null", getQueue().poll());
        expectUnchanged();
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(ONE)
      public void testPoll_size1() {
        assertEquals("size1Queue.poll() should return first element", e0(), getQueue().poll());
        expectMissing(e0());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  2. 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)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/QueuePollTester.java

      public void testPoll_empty() {
        assertNull("emptyQueue.poll() should return null", getQueue().poll());
        expectUnchanged();
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(ONE)
      public void testPoll_size1() {
        assertEquals("size1Queue.poll() should return first element", e0(), getQueue().poll());
        expectMissing(e0());
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/crypto/CachedCipher.java

            } catch (final UnsupportedEncodingException e) {
                throw new UnsupportedEncodingRuntimeException(e);
            }
        }
    
        protected Cipher pollEncryptoCipher() {
            Cipher cipher = encryptoQueue.poll();
            if (cipher == null) {
                final SecretKeySpec sksSpec = new SecretKeySpec(key.getBytes(), algorithm);
                try {
                    cipher = Cipher.getInstance(algorithm);
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  5. 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)
  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. 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)
  8. 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)
  9. istioctl/pkg/wait/wait.go

    				nameflag, namespace)
    			for {
    				// run the check here as soon as we start
    				// because tickers won't run immediately
    				present, notpresent, sdcnum, err := poll(cliCtx, cmd, generations, targetResource, proxyFlag, opts)
    				printVerbosef(cmd, "Received poll result: %d/%d", present, present+notpresent)
    				if err != nil {
    					return err
    				} else if float32(present)/float32(present+notpresent) >= threshold {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 17 12:24:17 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  10. 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)
Back to top