- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 379 for Runnable (0.22 sec)
-
guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java
public void testSameThreadScheduledExecutorWithException() throws InterruptedException { Runnable runnable = new Runnable() { @Override public void run() { throw new RuntimeException("Oh no!"); } }; Future<?> future = TestingExecutors.sameThreadScheduledExecutor().submit(runnable); assertThrows(ExecutionException.class, () -> future.get()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java
* otherwise-concurrent GC cycle. */ private static final class TaskNonReentrantExecutor extends AtomicReference<RunningState> implements Executor, Runnable { /** * Used to update and read the latestTaskQueue field. Set to null once the runnable has been run * or queued. */ @CheckForNull ExecutionSequencer sequencer; /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 01 21:46:34 GMT 2024 - 22.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/MoreExecutors.java
*/ @J2ktIncompatible @GwtIncompatible // concurrency static Thread newThread(String name, Runnable runnable) { checkNotNull(name); checkNotNull(runnable); // TODO(b/139726489): Confirm that null is impossible here. Thread result = requireNonNull(platformThreadFactory().newThread(runnable)); try { result.setName(name); } catch (SecurityException e) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Apr 17 16:33:44 GMT 2024 - 41.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java
} }; private static final Runnable GOOD_RUNNABLE = new Runnable() { @Override public void run() { try { MILLISECONDS.sleep(DELAY_MS); } catch (InterruptedException e) { throw new RuntimeException(e); } } }; private static final Runnable BAD_RUNNABLE = new Runnable() { @Override
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.5K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java
throws InterruptedException, ExecutionException, TimeoutException { checkNotNull(unit); return get(); } @Override public void addListener(Runnable runnable, Executor executor) { Listener listener = new Listener(runnable, executor); if (isDone()) { listener.execute(); } else { listeners.add(listener); } } @CanIgnoreReturnValue
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Jan 22 19:37:41 GMT 2024 - 12.3K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java
} @Override @SuppressWarnings("CatchingUnchecked") // sneaky checked exception public void runWithTimeout(Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit) { checkNotNull(runnable); checkNotNull(timeoutUnit); try { runnable.run(); } catch (Exception e) { // sneaky checked exception throw new UncheckedExecutionException(e); } catch (Error e) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Dec 14 20:35:03 GMT 2023 - 3.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java
*/ @GwtCompatible(emulated = true) @ElementTypesAreNonnullByDefault 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(); } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 21 16:49:06 GMT 2024 - 2.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/reflect/ReflectionTest.java
assertEquals("java.util", Reflection.getPackageName(Map.Entry.class)); } public void testNewProxy() throws Exception { Runnable runnable = Reflection.newProxy(Runnable.class, X_RETURNER); assertEquals("x", runnable.toString()); } public void testNewProxyCantWorkOnAClass() throws Exception { assertThrows(
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 2.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/reflect/ReflectionTest.java
assertEquals("java.util", Reflection.getPackageName(Map.Entry.class)); } public void testNewProxy() throws Exception { Runnable runnable = Reflection.newProxy(Runnable.class, X_RETURNER); assertEquals("x", runnable.toString()); } public void testNewProxyCantWorkOnAClass() throws Exception { assertThrows(
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 2.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
*/ protected ScheduledExecutorService executor() { @WeakOuter class ThreadFactoryImpl implements ThreadFactory { @Override public Thread newThread(Runnable runnable) { return MoreExecutors.newThread(serviceName(), runnable); } } final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryImpl());
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Dec 13 19:45:20 GMT 2023 - 25.8K bytes - Viewed (0)