Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for newScheduledThreadPool (0.25 sec)

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

                  throw new RuntimeException(e);
                }
              }
            };
        TestCustomScheduler scheduler = new TestCustomScheduler();
        Cancellable future = scheduler.schedule(null, Executors.newScheduledThreadPool(10), task);
        firstBarrier.await();
        assertEquals(1, scheduler.scheduleCounter.get());
        secondBarrier.await();
        firstBarrier.await();
        assertEquals(2, scheduler.scheduleCounter.get());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

                  throw new RuntimeException(e);
                }
              }
            };
        TestCustomScheduler scheduler = new TestCustomScheduler();
        Cancellable future = scheduler.schedule(null, Executors.newScheduledThreadPool(10), task);
        firstBarrier.await();
        assertEquals(1, scheduler.scheduleCounter.get());
        secondBarrier.await();
        firstBarrier.await();
        assertEquals(2, scheduler.scheduleCounter.get());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/MoreExecutors.java

       * the application is complete. It does so by using daemon threads and adding a shutdown hook to
       * wait for their completion.
       *
       * <p>This is mainly for fixed thread pools. See {@link Executors#newScheduledThreadPool(int)}.
       *
       * @param executor the executor to modify to make sure it exits when the application is finished
       * @param terminationTimeout how long to wait for the executor to finish before terminating the
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 15 10:40:05 UTC 2024
    - 43.7K bytes
    - Viewed (0)
  4. docs/recipes.md

    === ":material-language-kotlin: Kotlin"
        ```kotlin
          private val executor = Executors.newScheduledThreadPool(1)
          private val client = OkHttpClient()
    
          fun run() {
            val request = Request.Builder()
                .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Fri Feb 18 08:52:22 UTC 2022
    - 40.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/DuplexTest.kt

      private var client =
        clientTestRule.newClientBuilder()
          .eventListenerFactory(clientTestRule.wrap(listener))
          .build()
      private val executorService = Executors.newScheduledThreadPool(1)
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
        platform.assumeNotOpenJSSE()
        platform.assumeHttp2Support()
      }
    
      @AfterEach
      fun tearDown() {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

       * the application is complete. It does so by using daemon threads and adding a shutdown hook to
       * wait for their completion.
       *
       * <p>This is mainly for fixed thread pools. See {@link Executors#newScheduledThreadPool(int)}.
       *
       * @param executor the executor to modify to make sure it exits when the application is finished
       * @param terminationTimeout how long to wait for the executor to finish before terminating the
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 15 10:40:05 UTC 2024
    - 39K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        static TestCondition createAndSignalAfter(long delay, TimeUnit unit) {
          final TestCondition testCondition = create();
    
          ScheduledExecutorService scheduledPool = Executors.newScheduledThreadPool(1);
          // If signal() fails somehow, we should see a failed test, even without looking at the Future.
          Future<?> unused =
              scheduledPool.schedule(
                  new Runnable() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 30.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        static TestCondition createAndSignalAfter(long delay, TimeUnit unit) {
          final TestCondition testCondition = create();
    
          ScheduledExecutorService scheduledPool = Executors.newScheduledThreadPool(1);
          // If signal() fails somehow, we should see a failed test, even without looking at the Future.
          Future<?> unused =
              scheduledPool.schedule(
                  new Runnable() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 16:06:39 UTC 2024
    - 31.7K bytes
    - Viewed (0)
Back to top