- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 130 for Runnables (0.32 seconds)
-
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) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/concurrent/TaskRunnerTest.kt
"FINE: Q10000 scheduled after 100 µs: task", "FINE: Q10000 starting : task", "FINE: Q10000 finished run in 0 µs: task", ) } /** Inspect how many runnables have been enqueued. If none then we're truly sequential. */ @Test fun singleQueueIsSerial() { redQueue.execute("task one", 100.µs) { log += "one:run@${taskFaker.nanoTime} parallel=${taskFaker.isParallel}" }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 23K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java
sequential1.execute( new Runnable() { @Override public void run() { whileRunningToString[0] = "" + currentTask[0]; } @Override public String toString() { return "my runnable's toString"; } }); assertThat(whileRunningToString[0]).contains("my runnable's toString"); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 10.5K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/AbstractFuture.java
// Log it and keep going -- bad runnable and/or executor. Don't punish the other runnables if // we're given a bad one. We only catch Exception because we want Errors to propagate up. log.get() .log( SEVERE, "RuntimeException while executing runnable " + runnable + " with executor " + executor, e); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 14:39:00 GMT 2026 - 43.6K 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/SequentialExecutorTest.java
sequential1.execute( new Runnable() { @Override public void run() { whileRunningToString[0] = "" + currentTask[0]; } @Override public String toString() { return "my runnable's toString"; } }); assertThat(whileRunningToString[0]).contains("my runnable's toString"); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 10.5K bytes - Click Count (0)