Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 691 for Callable (0.18 sec)

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

        Callable<@Nullable Void> callable =
            new Callable<@Nullable Void>() {
              @Override
              public @Nullable Void call() throws Exception {
                assertEquals(Thread.currentThread().getName(), newName.get());
                return null;
              }
            };
        Callables.threadRenaming(callable, newName).call();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

       * <p>Cancellation does not propagate from the output future to a callable that has begun to
       * execute, but if the output future is cancelled before {@link Callable#call()} is invoked,
       * {@link Callable#call()} will not be invoked.
       */
      public <T extends @Nullable Object> ListenableFuture<T> submit(
          Callable<T> callable, Executor executor) {
        checkNotNull(callable);
        checkNotNull(executor);
        return submitAsync(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/CombinedFuture.java

        private final Callable<V> callable;
    
        CallableInterruptibleTask(Callable<V> callable, Executor listenerExecutor) {
          super(listenerExecutor);
          this.callable = checkNotNull(callable);
        }
    
        @Override
        @ParametricNullness
        V runInterruptibly() throws Exception {
          return callable.call();
        }
    
        @Override
        void setValue(@ParametricNullness V value) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

      private static final String GOOD_CALLABLE_RESULT = "good callable result";
      private static final Callable<String> GOOD_CALLABLE =
          new Callable<String>() {
            @Override
            public String call() throws InterruptedException {
              MILLISECONDS.sleep(DELAY_MS);
              return GOOD_CALLABLE_RESULT;
            }
          };
      private static final Callable<String> BAD_CALLABLE =
          new Callable<String>() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

        Callable<@Nullable Void> callable =
            new Callable<@Nullable Void>() {
              @Override
              public @Nullable Void call() throws Exception {
                assertEquals(Thread.currentThread().getName(), newName.get());
                return null;
              }
            };
        Callables.threadRenaming(callable, newName).call();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

      }
    
      @ParametricNullness
      private <T extends @Nullable Object> T callWithTimeout(
          Callable<T> callable, long timeoutDuration, TimeUnit timeoutUnit, boolean amInterruptible)
          throws Exception {
        checkNotNull(callable);
        checkNotNull(timeoutUnit);
        checkPositiveTimeout(timeoutDuration);
    
        Future<T> future = executor.submit(callable);
    
        try {
          return amInterruptible
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 27 14:21:11 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

      @Override
      @ParametricNullness
      public <T extends @Nullable Object> T callWithTimeout(
          Callable<T> callable, long timeoutDuration, TimeUnit timeoutUnit) throws ExecutionException {
        checkNotNull(callable);
        checkNotNull(timeoutUnit);
        try {
          return callable.call();
        } catch (RuntimeException e) {
          throw new UncheckedExecutionException(e);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

        final CountDownLatch exitLatch = new CountDownLatch(1);
        final TrustedListenableFutureTask<@Nullable Void> task =
            TrustedListenableFutureTask.create(
                new Callable<@Nullable Void>() {
                  @Override
                  public @Nullable Void call() throws Exception {
                    enterLatch.countDown();
                    new CountDownLatch(1).await(); // wait forever
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  9. android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        runConcurrentTest(
            numberOfThreads,
            new Callable<@Nullable Void>() {
              @Override
              public @Nullable Void call() throws Exception {
                long unused = ticker.read();
                return null;
              }
            });
    
        assertEquals(incrementByNanos * numberOfThreads, ticker.read());
      }
    
      /** Runs {@code callable} concurrently {@code numberOfThreads} times. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        Callable<@Nullable Void> cancelRunnable =
            new Callable<@Nullable Void>() {
              @Override
              public @Nullable Void call() {
                cancellationSuccess.set(currentFuture.get().cancel(true));
                awaitUnchecked(barrier);
                return null;
              }
            };
        Callable<@Nullable Void> setFutureCompleteSuccessfullyRunnable =
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
Back to top