Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 85 for reoffer (0.18 sec)

  1. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

      }
    
      // BlockingQueue.take() tests
      public void testTakeWithNoWait() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        BlockingQueue<String> queue = new ArrayBlockingQueue<>(1);
        assertTrue(queue.offer(""));
        assertEquals("", takeUninterruptibly(queue));
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
      }
    
      public void testTakeNoInterrupt() {
        TimedTakeQueue queue = TimedTakeQueue.createWithDelay(20);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

      /** The queued items */
      final E[] items;
      /** items index for next take, poll or remove */
      int takeIndex;
      /** items index for next put, offer, or add. */
      int putIndex;
      /** Number of items in the queue */
      private int count;
    
      /*
       * Concurrency control uses the classic two-condition algorithm
       * found in any textbook.
       */
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Comparators.java

          int k, Comparator<? super T> comparator) {
        checkNonnegative(k, "k");
        checkNotNull(comparator);
        return Collector.of(
            () -> TopKSelector.<T>least(k, comparator),
            TopKSelector::offer,
            TopKSelector::combine,
            TopKSelector::topK,
            Collector.Characteristics.UNORDERED);
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/Files.java

       *
       * <p><b>Warning:</b> If {@code to} represents an existing file, that file will be overwritten
       * with the contents of {@code from}. If {@code to} and {@code from} refer to the <i>same</i>
       * file, the contents of that file will be deleted.
       *
       * <p><b>{@link java.nio.file.Path} equivalent:</b> {@link
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/eventbus/EventBus.java

     *       <a href="https://developer.android.com/studio/build/shrink-code">R8 and Proguard</a>.
     *   <li>It doesn't offer a way to wait for multiple events before taking action. For example, it
     *       doesn't offer a way to wait for multiple producers to all report that they're "ready," nor
     *       does it offer a way to batch multiple events from a single producer together.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Aug 25 16:37:57 GMT 2021
    - 12.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java

        private final Deque<E> delegate = Lists.newLinkedList();
        public final Object mutex = new Integer(1); // something Serializable
    
        @Override
        public boolean offer(E o) {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.offer(o);
        }
    
        @Override
        public @Nullable E poll() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.poll();
        }
    
        @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

       */
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public boolean add(E e) {
        return offer(e);
      }
    
      /**
       * Inserts the specified element into this priority queue.
       *
       * @param e the element to add
       * @return {@code true} (as specified by {@link Queue#offer})
       * @throws ClassCastException if the specified element cannot be compared with elements currently
    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)
  8. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

      }
    
      // BlockingQueue.take() tests
      public void testTakeWithNoWait() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        BlockingQueue<String> queue = new ArrayBlockingQueue<>(1);
        assertTrue(queue.offer(""));
        assertEquals("", takeUninterruptibly(queue));
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
      }
    
      public void testTakeNoInterrupt() {
        TimedTakeQueue queue = TimedTakeQueue.createWithDelay(20);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

      /** The queued items */
      final E[] items;
      /** items index for next take, poll or remove */
      int takeIndex;
      /** items index for next put, offer, or add. */
      int putIndex;
      /** Number of items in the queue */
      private int count;
    
      /*
       * Concurrency control uses the classic two-condition algorithm
       * found in any textbook.
       */
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/EvictingQueue.java

       * of the queue is evicted to make room.
       *
       * @return {@code true} always
       */
      @Override
      @CanIgnoreReturnValue
      public boolean offer(E e) {
        return add(e);
      }
    
      /**
       * Adds the given element to this queue. If the queue is currently full, the element at the head
       * of the queue is evicted to make room.
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri May 12 17:52:55 GMT 2023
    - 4.6K bytes
    - Viewed (0)
Back to top