- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 134 for Runnables (0.38 seconds)
-
android/guava/src/com/google/common/util/concurrent/Runnables.java
*/ @SuppressWarnings({"InlineLambdaConstant", "UnnecessaryLambda"}) private static final Runnable EMPTY_RUNNABLE = () -> {}; /** Returns a {@link Runnable} instance that does nothing when run. */ public static Runnable doNothing() { return EMPTY_RUNNABLE; } private Runnables() {}Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Aug 05 15:30:14 GMT 2025 - 1.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/RunnablesTest.java
import org.jspecify.annotations.NullUnmarked; /** * Unit tests for {@link Runnables}. * * @author Olivier Pernet */ @GwtCompatible @NullUnmarked public class RunnablesTest extends TestCase { public void testDoNothingRunnableIsSingleton() { assertThat(Runnables.doNothing()).isSameInstanceAs(Runnables.doNothing()); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 1.1K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/ExecutionList.java
if (!executed) { runnables = new RunnableExecutorPair(runnable, executor, runnables); return; } } // Execute the runnable immediately. Because of scheduling this may end up getting called before // some of the previously added runnables, but we're OK with that. If we want to change the // contract to guarantee ordering among runnables we'd have to modify the logic here to allow // it.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Feb 10 11:51:21 GMT 2026 - 6.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/RunnablesTest.java
import org.jspecify.annotations.NullUnmarked; /** * Unit tests for {@link Runnables}. * * @author Olivier Pernet */ @GwtCompatible @NullUnmarked public class RunnablesTest extends TestCase { public void testDoNothingRunnableIsSingleton() { assertThat(Runnables.doNothing()).isSameInstanceAs(Runnables.doNothing()); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 1.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
list.add(new MockRunnable(countDownLatch), exec); list.add(new MockRunnable(countDownLatch), exec); assertEquals(3L, countDownLatch.getCount()); list.execute(); // Verify that all of the runnables execute in a reasonable amount of time. assertTrue(countDownLatch.await(1L, SECONDS)); } public void testExecute_idempotent() { AtomicInteger runCalled = new AtomicInteger();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.4K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
list.add(new MockRunnable(countDownLatch), exec); list.add(new MockRunnable(countDownLatch), exec); assertEquals(3L, countDownLatch.getCount()); list.execute(); // Verify that all of the runnables execute in a reasonable amount of time. assertTrue(countDownLatch.await(1L, SECONDS)); } public void testExecute_idempotent() { AtomicInteger runCalled = new AtomicInteger();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.4K bytes - Click Count (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/AbstractFutureFootprintBenchmark.java
} } }; thread.start(); blockedThreads.add(thread); } for (int i = 0; i < numListeners; i++) { f.addListener(Runnables.doNothing(), directExecutor()); } for (Thread thread : blockedThreads) { AbstractFutureBenchmarks.awaitWaiting(thread); } switch (state) { case NOT_DONE: break;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java
assertThat(result).isEqualTo(RETURN_VALUE); } public void testRunWithTimeout_returnsWithoutException() throws Exception { timeLimiter.runWithTimeout(Runnables.doNothing(), DELAY_MS, MILLISECONDS); } public void testRunWithTimeout_wrapsUncheckedException() throws Exception { RuntimeException exception = new RuntimeException("test"); UncheckedExecutionException e =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.1K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java
assertThat(result).isEqualTo(RETURN_VALUE); } public void testRunWithTimeout_returnsWithoutException() throws Exception { timeLimiter.runWithTimeout(Runnables.doNothing(), DELAY_MS, MILLISECONDS); } public void testRunWithTimeout_wrapsUncheckedException() throws Exception { RuntimeException exception = new RuntimeException("test"); UncheckedExecutionException e =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractListeningExecutorServiceTest.java
@Override public void execute(Runnable runnable) { assertThat(runnable).isInstanceOf(TrustedListenableFutureTask.class); runnable.run(); } @Override public void shutdown() {} @Override public List<Runnable> shutdownNow() { return ImmutableList.of(); } @Override public boolean isShutdown() { return false; } @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 3.4K bytes - Click Count (0)