Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 197 for callables (0.19 sec)

  1. android/guava/src/com/google/common/util/concurrent/Callables.java

          Callable<T> callable, ListeningExecutorService listeningExecutorService) {
        checkNotNull(callable);
        checkNotNull(listeningExecutorService);
        return () -> listeningExecutorService.submit(callable);
      }
    
      /**
       * Wraps the given callable such that for the duration of {@link Callable#call} the thread that is
       * running will have the given name.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

      public void testReturning() throws Exception {
        assertNull(Callables.returning(null).call());
    
        Object value = new Object();
        Callable<Object> callable = Callables.returning(value);
        assertSame(value, callable.call());
        // Expect the same value on subsequent calls
        assertSame(value, callable.call());
      }
    
      @J2ktIncompatible
      @GwtIncompatible
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

      public void testReturning() throws Exception {
        assertNull(Callables.returning(null).call());
    
        Object value = new Object();
        Callable<Object> callable = Callables.returning(value);
        assertSame(value, callable.call());
        // Expect the same value on subsequent calls
        assertSame(value, callable.call());
      }
    
      @J2ktIncompatible
      @GwtIncompatible
    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)
  4. 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)
  5. android/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 26 12:43:10 GMT 2024
    - Last Modified: Thu Jan 05 19:41:03 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

                directExecutor());
        for (int i = 0; i < 25_000; i++) {
          serializer.submit(Callables.<Void>returning(null), directExecutor()).cancel(true);
          unused = serializer.submit(Callables.<Void>returning(null), directExecutor());
        }
        ListenableFuture<Integer> stackDepthCheck =
            serializer.submit(
                new Callable<Integer>() {
                  @Override
                  public Integer call() {
    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)
  7. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

                directExecutor());
        for (int i = 0; i < 25_000; i++) {
          serializer.submit(Callables.<Void>returning(null), directExecutor()).cancel(true);
          unused = serializer.submit(Callables.<Void>returning(null), directExecutor());
        }
        ListenableFuture<Integer> stackDepthCheck =
            serializer.submit(
                new Callable<Integer>() {
                  @Override
                  public Integer call() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

                        runnableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS));
        assertThat(e.getCause()).isEqualTo(exception);
      }
    
      public static <T> Callable<T> callableThrowing(final Exception exception) {
        return new Callable<T>() {
          @Override
          public T call() throws Exception {
            throw exception;
          }
        };
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        List<Callable<T>> tasks = ImmutableList.of();
        List<? extends Future<?>> unused = executor.invokeAll(tasks);
      }
    
      public void testListeningDecorator() throws Exception {
        ListeningExecutorService service = listeningDecorator(newDirectExecutorService());
        assertSame(service, listeningDecorator(service));
        List<Callable<String>> callables = ImmutableList.of(Callables.returning("x"));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (3)
  10. android/guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

                        runnableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS));
        assertThat(e.getCause()).isEqualTo(exception);
      }
    
      public static <T> Callable<T> callableThrowing(final Exception exception) {
        return new Callable<T>() {
          @Override
          public T call() throws Exception {
            throw exception;
          }
        };
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
Back to top