- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 226 for runnable (0.04 sec)
-
guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java
} } @Override public void runWithTimeout(Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, InterruptedException { checkNotNull(runnable); checkNotNull(timeoutUnit); checkPositiveTimeout(timeoutDuration); Future<?> future = executor.submit(runnable); try { future.get(timeoutDuration, timeoutUnit);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 9.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/AbstractFutureFootprintBenchmark.java
} } // This exclusion doesn't exclude the TOMBSTONE objects we set. So 'done' NEW futures will look // larger than they are. @SuppressWarnings("FutureReturnValueIgnored") @Footprint(exclude = {Runnable.class, Executor.class, Thread.class, Exception.class}) public Object measureSize() { for (Thread thread : blockedThreads) { thread.interrupt(); } blockedThreads.clear();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 3K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java
AtomicLong count = (nameFormat != null) ? new AtomicLong(0) : null; return new ThreadFactory() { @Override public Thread newThread(Runnable runnable) { Thread thread = backingThreadFactory.newThread(runnable); // TODO(b/139735208): Figure out what to do when the factory returns null. requireNonNull(thread); if (nameFormat != null) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:35:26 UTC 2025 - 9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/ConnectionPoolTest.kt
} @Test fun interruptStopsThread() { val taskRunnerThreads = mutableListOf<Thread>() val taskRunner = TaskRunner( RealBackend { runnable -> Thread(runnable, "interruptStopsThread TaskRunner") .also { taskRunnerThreads += it } }, ) val pool = factory.newConnectionPool( taskRunner = taskRunner,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 12.9K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ImmediateFuture.java
public void addListener(Runnable listener, Executor executor) { checkNotNull(listener, "Runnable was null."); checkNotNull(executor, "Executor was null."); try { executor.execute(listener); } catch (Exception e) { // sneaky checked exception // ListenableFuture's contract is that it will not throw unchecked exceptions, so log the bad // runnable and/or executor and swallow it. log.get()
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 3.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java
/** * Tests for ThreadFactoryBuilder. * * @author Kurt Alfred Kluever * @author Martin Buchholz */ @NullUnmarked public class ThreadFactoryBuilderTest extends TestCase { private final Runnable monitoredRunnable = new Runnable() { @Override public void run() { completed = true; } }; private static final UncaughtExceptionHandler UNCAUGHT_EXCEPTION_HANDLER =
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 7.6K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
*/ protected ScheduledExecutorService executor() { @WeakOuter final class ThreadFactoryImpl implements ThreadFactory { @Override public Thread newThread(Runnable runnable) { return MoreExecutors.newThread(serviceName(), runnable); } } ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryImpl());
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 27.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java
* @author George van den Driessche */ @GwtCompatible @NullMarked public class AbstractTester<G> extends TestCase { private G subjectGenerator; private String suiteName; private @Nullable Runnable setUp; private @Nullable Runnable tearDown; // public so that it can be referenced in generated GWT tests. @Override public void setUp() throws Exception { if (setUp != null) { setUp.run(); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 3.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java
@Override public String get(long time, TimeUnit unit) { return "foo"; // BAD!! } @Override public void addListener(Runnable runnable, Executor executor) { executor.execute(runnable); } }; Future<?> future = newFutureInstance(); future .getClass() .getMethod( "setFuture",
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 6.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java
@Override public String get(long time, TimeUnit unit) { return "foo"; // BAD!! } @Override public void addListener(Runnable runnable, Executor executor) { executor.execute(runnable); } }; Future<?> future = newFutureInstance(); future .getClass() .getMethod( "setFuture",
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 6.1K bytes - Viewed (0)