Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for BlockingQueue (0.19 sec)

  1. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBenchmark.java

    import java.lang.reflect.Constructor;
    import java.util.concurrent.BlockingQueue;
    
    /**
     * Benchmarks for {@link Monitor}.
     *
     * @author Justin T. Sampson
     */
    public class MonitorBenchmark {
    
      @Param({"10", "100", "1000"})
      int capacity;
    
      @Param({"Array", "Priority"})
      String queueType;
    
      @Param boolean useMonitor;
    
      private BlockingQueue<String> queue;
      private String[] strings;
    
      @BeforeExperiment
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBenchmark.java

    import java.lang.reflect.Constructor;
    import java.util.concurrent.BlockingQueue;
    
    /**
     * Benchmarks for {@link Monitor}.
     *
     * @author Justin T. Sampson
     */
    public class MonitorBenchmark {
    
      @Param({"10", "100", "1000"})
      int capacity;
    
      @Param({"Array", "Priority"})
      String queueType;
    
      @Param boolean useMonitor;
    
      private BlockingQueue<String> queue;
      private String[] strings;
    
      @BeforeExperiment
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/QueuesTest.java

     *
     * @author Dimitris Andreou
     */
    public class QueuesTest extends TestCase {
      /*
       * All the following tests relate to BlockingQueue methods in Queues.
       */
    
      public static List<BlockingQueue<Object>> blockingQueues() {
        return ImmutableList.<BlockingQueue<Object>>of(
            new LinkedBlockingQueue<Object>(),
            new LinkedBlockingQueue<Object>(10),
            new SynchronousQueue<Object>(),
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.internal.duplex
    
    import java.util.concurrent.BlockingQueue
    import java.util.concurrent.LinkedBlockingQueue
    import java.util.concurrent.TimeUnit.SECONDS
    import okhttp3.MediaType
    import okhttp3.RequestBody
    import okio.BufferedSink
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        assertTrue(signaledBeforeTimeout);
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
        assertInterrupted();
      }
    
      // BlockingQueue.put() tests
      public void testPutWithNoWait() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        BlockingQueue<String> queue = new ArrayBlockingQueue<>(999);
        putUninterruptibly(queue, "");
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
    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)
  6. guava-tests/test/com/google/common/collect/QueuesTest.java

     *
     * @author Dimitris Andreou
     */
    public class QueuesTest extends TestCase {
      /*
       * All the following tests relate to BlockingQueue methods in Queues.
       */
    
      public static List<BlockingQueue<Object>> blockingQueues() {
        return ImmutableList.<BlockingQueue<Object>>of(
            new LinkedBlockingQueue<Object>(),
            new LinkedBlockingQueue<Object>(10),
            new SynchronousQueue<Object>(),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java

    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import java.util.Collection;
    import java.util.concurrent.BlockingQueue;
    import java.util.concurrent.TimeUnit;
    import javax.annotation.CheckForNull;
    
    /**
     * A {@link BlockingQueue} which forwards all its method calls to another {@link BlockingQueue}.
     * Subclasses should override one or more methods to modify the behavior of the backing collection
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 3K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt

     * limitations under the License.
     */
    package mockwebserver3
    
    import java.net.HttpURLConnection
    import java.net.HttpURLConnection.HTTP_UNAVAILABLE
    import java.util.concurrent.BlockingQueue
    import java.util.concurrent.LinkedBlockingQueue
    import java.util.logging.Logger
    import okhttp3.ExperimentalOkHttpApi
    
    /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        assertTrue(signaledBeforeTimeout);
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
        assertInterrupted();
      }
    
      // BlockingQueue.put() tests
      public void testPutWithNoWait() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        BlockingQueue<String> queue = new ArrayBlockingQueue<>(999);
        putUninterruptibly(queue, "");
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      }
    
      /** Invokes {@code queue.}{@link BlockingQueue#take() take()} uninterruptibly. */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
      public static <E> E takeUninterruptibly(BlockingQueue<E> queue) {
        boolean interrupted = false;
        try {
          while (true) {
            try {
              return queue.take();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 14.4K bytes
    - Viewed (0)
Back to top