- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 458 for Callable (0.09 sec)
-
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();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 5.5K bytes - Viewed (0) -
docs/en/docs/advanced/advanced-dependencies.md
But we want to be able to parameterize that fixed content. ## A "callable" instance In Python there's a way to make an instance of a class a "callable". Not the class itself (which is already a callable), but an instance of that class. To do that, we declare a method `__call__`: {* ../../docs_src/dependencies/tutorial011_an_py39.py hl[12] *}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:10:15 UTC 2024 - 2.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.7K bytes - Viewed (0) -
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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 9.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/WrappingScheduledExecutorServiceTest.java
public TestExecutor(MockExecutor mock) { super(mock); } @Override protected <T> Callable<T> wrapTask(Callable<T> callable) { return new WrappedCallable<T>(callable); } @Override protected Runnable wrapTask(Runnable command) { return new WrappedRunnable(command); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 7.6K bytes - Viewed (0) -
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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 9.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.7K bytes - Viewed (0) -
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. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 22 13:49:09 UTC 2024 - 6.5K bytes - Viewed (0) -
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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 7.3K bytes - Viewed (0) -
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"));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 28.1K bytes - Viewed (0)