Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for newCachedThreadPool (0.75 sec)

  1. android/guava-tests/test/com/google/common/collect/QueuesTest.java

    import static com.google.common.truth.Truth.assertThat;
    import static java.lang.Long.MAX_VALUE;
    import static java.lang.Thread.currentThread;
    import static java.util.concurrent.Executors.newCachedThreadPool;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

                  }
                  return 25;
                }
              });
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
    
        exec = Executors.newCachedThreadPool();
    
        task.addListener(
            new Runnable() {
              @Override
              public void run() {
                listenerLatch.countDown();
              }
            },
            directExecutor());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

      var platform = PlatformRule()
    
      private lateinit var executorService: ExecutorService
    
      private var serverSocket: ServerSocket? = null
    
      @BeforeEach fun setUp() {
        executorService = Executors.newCachedThreadPool(threadFactory("HandshakeCertificatesTest"))
      }
    
      @AfterEach fun tearDown() {
        executorService.shutdown()
        serverSocket?.closeQuietly()
      }
    
      @Test fun clientAndServer() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  4. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

          .build()
    
      @After
      fun tearDown() {
        engine.shutdown()
        cacheDir.deleteRecursively()
      }
    
      @Test
      fun get() {
        val executor = Executors.newCachedThreadPool()
    
        val completableFuture = execute(engine, executor, "https://google.com/robots.txt")
    
        try {
          val response = completableFuture.get(10, TimeUnit.SECONDS)
    
          assertEquals(200, response.code)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. .github/workflows/CheckBadMerge.groovy

     * If any "bad" merge commit is found, it will print the details and exit with non-zero code.
     */
    class CheckBadMerge {
        private static final THREAD_POOL = Executors.newCachedThreadPool()
    
        private static final List<String> MONITORED_FILES = [
            "subprojects/docs/src/docs/release/notes.md",
            "platforms/documentation/docs/src/docs/release/notes.md",
    Groovy
    - Registered: Wed May 08 11:36:15 GMT 2024
    - Last Modified: Tue Dec 19 10:35:44 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

                }
                throw new RejectedExecutionException();
              }
            };
        final SequentialExecutor executor = new SequentialExecutor(delegate);
        final ExecutorService blocked = Executors.newCachedThreadPool();
        Future<?> first =
            blocked.submit(
                new Runnable() {
                  @Override
                  public void run() {
                    executor.execute(Runnables.doNothing());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.io.TempDir
    
    @Tag("Slowish")
    class RelayTest {
      @TempDir
      var tempDir: File? = null
      private val executor = Executors.newCachedThreadPool(threadFactory("RelayTest"))
      private val metadata: ByteString = "great metadata!".encodeUtf8()
      private lateinit var file: File
    
      @BeforeEach
      fun setUp() {
        file = File(tempDir, "test")
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

                .setDaemon(true)
                .setNameFormat("ListenableFutureAdapter-thread-%d")
                .build();
        private static final Executor defaultAdapterExecutor =
            Executors.newCachedThreadPool(threadFactory);
    
        private final Executor adapterExecutor;
    
        // The execution list to hold our listeners.
        private final ExecutionList executionList = new ExecutionList();
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/SocksProxy.kt

    /**
     * A limited implementation of SOCKS Protocol Version 5, intended to be similar to MockWebServer.
     * See [RFC 1928](https://www.ietf.org/rfc/rfc1928.txt).
     */
    class SocksProxy {
      private val executor = Executors.newCachedThreadPool(threadFactory("SocksProxy"))
      private var serverSocket: ServerSocket? = null
      private val connectionCount = AtomicInteger()
      private val openSockets = Collections.newSetFromMap(ConcurrentHashMap<Socket, Boolean>())
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/tests/ConcurrencyTest.java

        }
    
    
        @Override
        @Before
        public void setUp () throws Exception {
            super.setUp();
            this.executor = Executors.newCachedThreadPool();
        }
    
    
        @After
        @Override
        public void tearDown () throws Exception {
            this.executor.shutdown();
            this.executor.awaitTermination(10, TimeUnit.SECONDS);
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Nov 14 17:40:50 GMT 2021
    - 17.6K bytes
    - Viewed (0)
Back to top