Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 226 for runnable (0.1 sec)

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

        this.exec = newCachedThreadPool();
        this.future = checkNotNull(future);
        this.latch = new CountDownLatch(1);
      }
    
      public void setUp() {
        future.addListener(
            new Runnable() {
              @Override
              public void run() {
                latch.countDown();
              }
            },
            exec);
    
        assertEquals(1, latch.getCount());
        assertFalse(future.isDone());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

          this.adapterExecutor = checkNotNull(adapterExecutor);
        }
    
        @Override
        protected Future<V> delegate() {
          return delegate;
        }
    
        @Override
        public void addListener(Runnable listener, Executor exec) {
          executionList.add(listener, exec);
    
          // When a listener is first added, we run a task that will wait for the delegate to finish,
          // and when it is done will run the listeners.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        cache.getUnchecked("a");
        shouldWait.set(true);
    
        CountDownLatch computationStarted = new CountDownLatch(1);
        CountDownLatch computationComplete = new CountDownLatch(1);
        new Thread(
                new Runnable() {
                  @Override
                  public void run() {
                    computationStarted.countDown();
                    cache.getUnchecked("b");
                    computationComplete.countDown();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        cache.getUnchecked("a");
        shouldWait.set(true);
    
        CountDownLatch computationStarted = new CountDownLatch(1);
        CountDownLatch computationComplete = new CountDownLatch(1);
        new Thread(
                new Runnable() {
                  @Override
                  public void run() {
                    computationStarted.countDown();
                    cache.getUnchecked("b");
                    computationComplete.countDown();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

      @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait.
      static void awaitWaiting(Thread t) {
        while (true) {
          Thread.State state = t.getState();
          switch (state) {
            case RUNNABLE:
            case BLOCKED:
              Thread.yield();
              break;
            case WAITING:
              return;
            default:
              throw new AssertionError("unexpected state: " + state);
          }
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jan 30 16:59:10 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

                  return 25;
                }
              });
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
    
        exec = newCachedThreadPool();
    
        task.addListener(
            new Runnable() {
              @Override
              public void run() {
                listenerLatch.countDown();
              }
            },
            directExecutor());
      }
    
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java

       * this method to use a custom {@link Executor}, which may configure its worker thread with a
       * specific name, thread group or priority. The returned executor's {@link
       * Executor#execute(Runnable) execute()} method is called when this service is started, and should
       * return promptly.
       *
       * <p>The default implementation returns a new {@link Executor} that sets the name of its threads
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  8. guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

        assertTrue(ArbitraryInstances.get(ConcurrentMap.class).isEmpty());
        assertTrue(ArbitraryInstances.get(ConcurrentNavigableMap.class).isEmpty());
        ArbitraryInstances.get(Executor.class).execute(ArbitraryInstances.get(Runnable.class));
        assertNotNull(ArbitraryInstances.get(ThreadFactory.class));
        assertFreshInstanceReturned(
            BlockingQueue.class,
            BlockingDeque.class,
            PriorityBlockingQueue.class,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  9. docs/changelogs/upgrading_to_okhttp_4.md

              InetAddress.getAllByName(hostname).toList()
        })
        .build()
    ```
    
    SAM conversion impacts these APIs:
    
     * Authenticator
     * Dispatcher.setIdleCallback(Runnable)
     * Dns
     * EventListener.Factory
     * HttpLoggingInterceptor.Logger
     * LoggingEventListener.Factory
     * OkHttpClient.Builder.hostnameVerifier(HostnameVerifier)
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  10. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        }
    
        @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait.
        Interruptenator(Thread interruptee, AtomicBoolean shutdown) {
          super(
              new Runnable() {
                @Override
                public void run() {
                  while (!shutdown.get()) {
                    interruptee.interrupt();
                    Thread.yield();
                  }
                }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 7.9K bytes
    - Viewed (0)
Back to top