Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 139 for queue (0.14 sec)

  1. android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java

        /** Runnable is not running and not queued for execution */
        IDLE,
        /** Runnable is not running, but is being queued for execution */
        QUEUING,
        /** runnable has been submitted but has not yet begun execution */
        QUEUED,
        RUNNING,
      }
    
      /** Underlying executor that all submitted Runnable objects are run on. */
      private final Executor executor;
    
      @GuardedBy("queue")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        ListenerCallQueue<Object> queue = new ListenerCallQueue<>();
        queue.addListener(listener, directExecutor());
    
        Multiset<Object> counters = ConcurrentHashMultiset.create();
        queue.enqueue(incrementingEvent(counters, listener, 1));
        queue.enqueue(THROWING_EVENT);
        queue.enqueue(incrementingEvent(counters, listener, 2));
        queue.enqueue(THROWING_EVENT);
        queue.enqueue(incrementingEvent(counters, listener, 3));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java

    import java.util.Collection;
    import java.util.Iterator;
    import java.util.Queue;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Tests for {@link Synchronized#queue} and {@link Queues#synchronizedQueue}.
     *
     * @author Kurt Alfred Kluever
     */
    public class SynchronizedQueueTest extends TestCase {
    
      protected Queue<String> create() {
        TestQueue<String> inner = new TestQueue<>();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/TestsForQueuesInJavaUtil.java

        return QueueTestSuiteBuilder.using(
                new TestStringQueueGenerator() {
                  @Override
                  public Queue<String> create(String[] elements) {
                    Queue<String> queue = new LinkedList<>(MinimalCollection.of(elements));
                    return Collections.checkedQueue(queue, String.class);
                  }
                })
            .named("checkedQueue/LinkedList")
            .withFeatures(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 9.4K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBenchmark.java

        queue = (BlockingQueue<String>) constructor.newInstance(capacity);
    
        strings = new String[capacity];
        for (int i = 0; i < capacity; i++) {
          strings[i] = String.valueOf(Math.random());
        }
      }
    
      @Benchmark
      void addsAndRemoves(int reps) {
        int capacity = this.capacity;
        BlockingQueue<String> queue = this.queue;
        String[] strings = this.strings;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/FinalizableWeakReference.java

      /**
       * Constructs a new finalizable weak reference.
       *
       * @param referent to weakly reference
       * @param queue that should finalize the referent
       */
      protected FinalizableWeakReference(@CheckForNull T referent, FinalizableReferenceQueue queue) {
        super(referent, queue.queue);
        queue.cleanUp();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ForwardingQueue.java

    import java.util.NoSuchElementException;
    import java.util.Queue;
    import javax.annotation.CheckForNull;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * A queue which forwards all its method calls to another queue. Subclasses should override one or
     * more methods to modify the behavior of the backing queue as desired per the <a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 29 19:42:21 GMT 2021
    - 4.1K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/TestQueueGenerator.java

    import java.util.Queue;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Creates queues, containing sample elements, to be tested.
     *
     * @author Jared Levy
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public interface TestQueueGenerator<E extends @Nullable Object> extends TestCollectionGenerator<E> {
      @Override
      Queue<E> create(Object... elements);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/EvictingQueue.java

    import java.util.Collection;
    import java.util.Queue;
    
    /**
     * A non-blocking queue which automatically evicts elements from the head of the queue when
     * attempting to add new elements onto the queue and it is full. This queue orders elements FIFO
     * (first-in-first-out). This data structure is logically equivalent to a circular buffer (i.e.,
     * cyclic buffer or ring buffer).
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:52:55 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Queues.java

       *
       * @param queue the queue to be wrapped in a synchronized view
       * @return a synchronized view of the specified queue
       * @since 14.0
       */
      public static <E extends @Nullable Object> Queue<E> synchronizedQueue(Queue<E> queue) {
        return Synchronized.queue(queue, null);
      }
    
      /**
       * Returns a synchronized (thread-safe) deque backed by the specified deque. In order to guarantee
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 16K bytes
    - Viewed (0)
Back to top