- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 229 for Runnables (0.54 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) -
guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java
} } private static class RunnableExecutorPair { final Runnable runnable; final Executor executor; RunnableExecutorPair(Runnable runnable, Executor executor) { this.runnable = runnable; this.executor = executor; } void execute() { try { executor.execute(runnable); } catch (RuntimeException e) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Jul 16 17:42:14 GMT 2025 - 15.8K 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) -
android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java
} } private static class RunnableExecutorPair { final Runnable runnable; final Executor executor; RunnableExecutorPair(Runnable runnable, Executor executor) { this.runnable = runnable; this.executor = executor; } void execute() { try { executor.execute(runnable); } catch (RuntimeException e) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Jul 16 17:42:14 GMT 2025 - 15.8K 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/src/com/google/common/util/concurrent/SequentialExecutor.java
enum WorkerRunningState { /** Runnable is not running and not queued for execution */ IDLE, /** Runnable is not running, but is being queued for execution */ QUEUING, /** runnable has been submitted but has not yet begun execution */ QUEUED, RUNNING, } /** Underlying executor that all submitted Runnable objects are run on. */ private final Executor executor;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 10.6K bytes - Click Count (0)