Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 119 for 9000 (0.23 sec)

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

      @GwtIncompatible // blocking wait
      public void testRunIdempotency() throws Exception {
        final int numThreads = 10;
        final ExecutorService executor = Executors.newFixedThreadPool(numThreads);
        for (int i = 0; i < 1000; i++) {
          final AtomicInteger counter = new AtomicInteger();
          final TrustedListenableFutureTask<Integer> task =
              TrustedListenableFutureTask.create(
                  new Callable<Integer>() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

                manager.stopAsync().awaitStopped();
              }
            };
        stoppingThread.start();
        // this should be super fast since the only non-stopped service is a NoOpService
        stoppingThread.join(1000);
        assertFalse("stopAsync has deadlocked!.", stoppingThread.isAlive());
        failLeave.countDown(); // release the background thread
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        }
      }
    
      @AndroidIncompatible // Presumably GC doesn't trigger, despite our efforts.
      public void testWeakReadWrite() {
        Striped<ReadWriteLock> striped = Striped.lazyWeakReadWriteLock(1000);
        Object key = new Object();
        Lock readLock = striped.get(key).readLock();
        WeakReference<Object> garbage = new WeakReference<>(new Object());
        GcFinalization.awaitClear(garbage);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/TestThread.java

     * @author Justin T. Sampson
     */
    public final class TestThread<L> extends Thread implements TearDown {
    
      private static final long DUE_DILIGENCE_MILLIS = 100;
      private static final long TIMEOUT_MILLIS = 5000;
    
      private final L lockLikeObject;
    
      private final SynchronousQueue<Request> requestQueue = new SynchronousQueue<>();
      private final SynchronousQueue<Response> responseQueue = new SynchronousQueue<>();
    
    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)
  5. guava-tests/test/com/google/common/base/SuppliersTest.java

                Thread.yield();
                counter = nextValue;
                return counter;
              }
            };
    
        final int numThreads = 10;
        final int iterations = 1000;
        Thread[] threads = new Thread[numThreads];
        for (int i = 0; i < numThreads; i++) {
          threads[i] =
              new Thread() {
                @Override
                public void run() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/base/SuppliersTest.java

                Thread.yield();
                counter = nextValue;
                return counter;
              }
            };
    
        final int numThreads = 10;
        final int iterations = 1000;
        Thread[] threads = new Thread[numThreads];
        for (int i = 0; i < numThreads; i++) {
          threads[i] =
              new Thread() {
                @Override
                public void run() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/AbstractGraphTest.java

      static final Integer N1 = 1;
      static final Integer N2 = 2;
      static final Integer N3 = 3;
      static final Integer N4 = 4;
      static final Integer N5 = 5;
      static final Integer NODE_NOT_IN_GRAPH = 1000;
    
      // TODO(user): Consider separating Strings that we've defined here to capture
      // identifiable substrings of expected error messages, from Strings that we've defined
      // here to provide error messages.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/primitives/ImmutableLongArrayTest.java

        for (int i = 0; i < reduceIterationsIfGwt(100); i++) {
          ImmutableLongArray.Builder builder = ImmutableLongArray.builder(RANDOM.nextInt(20));
          AtomicLong counter = new AtomicLong(0);
          while (counter.get() < 1000) {
            BuilderOp op = BuilderOp.randomOp();
            op.doIt(builder, counter);
          }
          ImmutableLongArray iia = builder.build();
          for (int j = 0; j < iia.length(); j++) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 19K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

          ImmutableDoubleArray.Builder builder = ImmutableDoubleArray.builder(RANDOM.nextInt(20));
          AtomicInteger counter = new AtomicInteger(0);
          while (counter.get() < 1000) {
            BuilderOp op = BuilderOp.randomOp();
            op.doIt(builder, counter);
          }
          ImmutableDoubleArray iia = builder.build();
          for (int j = 0; j < iia.length(); j++) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        public long skip(long n) throws IOException {
          return super.skip(Math.min(max, n));
        }
      }
    
      public void testReadBytes() throws IOException {
        final byte[] array = newPreFilledByteArray(1000);
        assertThat(ByteStreams.readBytes(new ByteArrayInputStream(array), new TestByteProcessor()))
            .isEqualTo(array);
      }
    
      private static class TestByteProcessor implements ByteProcessor<byte[]> {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
Back to top