Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,060 for Callable (0.17 sec)

  1. 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)
  2. android/guava/src/com/google/common/util/concurrent/TimeLimiter.java

       * @throws ExecutionException if {@code callable} throws a checked exception
       * @throws UncheckedExecutionException if {@code callable} throws a {@code RuntimeException}
       * @throws ExecutionError if {@code callable} throws an {@code Error}
       * @since 22.0
       */
      @CanIgnoreReturnValue
      @ParametricNullness
      <T extends @Nullable Object> T callUninterruptiblyWithTimeout(
          Callable<T> callable, long timeoutDuration, TimeUnit timeoutUnit)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java

        this.delegate = checkNotNull(delegate);
      }
    
      /**
       * Wraps a {@code Callable} for submission to the underlying executor. This method is also applied
       * to any {@code Runnable} passed to the default implementation of {@link #wrapTask(Runnable)}.
       */
      protected abstract <T extends @Nullable Object> Callable<T> wrapTask(Callable<T> callable);
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  4. 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)
  5. android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java

      /**
       * Creates a {@code ListenableFutureTask} that will upon running, execute the given {@code
       * Callable}.
       *
       * @param callable the callable task
       * @since 10.0
       */
      public static <V extends @Nullable Object> ListenableFutureTask<V> create(Callable<V> callable) {
        return new ListenableFutureTask<>(callable);
      }
    
      /**
       * Creates a {@code ListenableFutureTask} that will upon running, execute the given {@code
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  6. 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)
  7. android/guava-testlib/src/com/google/common/util/concurrent/testing/SameThreadScheduledExecutorService.java

        return schedule(java.util.concurrent.Executors.callable(command), delay, unit);
      }
    
      @Override
      public <V> ListenableScheduledFuture<V> schedule(
          Callable<V> callable, long delay, TimeUnit unit) {
        Preconditions.checkNotNull(callable, "callable must not be null!");
        Preconditions.checkNotNull(unit, "unit must not be null!");
        ListenableFuture<V> delegateFuture = submit(callable);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Oct 06 00:47:57 GMT 2021
    - 6.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

        }
      }
    
      private static List<Callable<String>> createTasks(int n) {
        List<Callable<String>> callables = Lists.newArrayList();
        for (int i = 0; i < n; i++) {
          callables.add(Callables.returning(RESULT_VALUE + i));
        }
        return callables;
      }
    
      private static final class WrappedCallable<T> implements Callable<T> {
        private final Callable<T> delegate;
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Jan 05 19:41:03 GMT 2023
    - 9.8K 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/ExecutionSequencerTest.java

              }
            };
    
        results.add(serializer.submit(Callables.returning(null), manualExecutor));
        final Future<?>[] thingToCancel = new Future<?>[1];
        results.add(
            serializer.submit(
                new Callable<@Nullable Void>() {
                  @Override
                  public @Nullable Void call() {
                    thingToCancel[0].cancel(false);
                    return null;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
Back to top