- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 433 for Future (0.11 sec)
-
guava/src/com/google/common/util/concurrent/Uninterruptibles.java
} /** * Invokes {@code future.}{@link Future#get() get()} uninterruptibly. * * <p>Similar methods: * * <ul> * <li>To retrieve a result from a {@code Future} that is already done, use {@link * Futures#getDone Futures.getDone}. * <li>To treat {@link InterruptedException} uniformly with other exceptions, use {@link * Futures#getChecked(Future, Class) Futures.getChecked}.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 19.1K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
final SettableFuture<@Nullable Void> future = SettableFuture.create(); Object unused = new Object() { @SuppressWarnings({"removal", "Finalize"}) // b/260137033 @Override protected void finalize() { future.set(null); } }; unused = null; // Hint to the JIT that unused is unreachable GcFinalization.awaitDone(future); assertTrue(future.isDone());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java
SettableFuture<Integer> future = SettableFuture.create(); assertTrue(future.set(42)); // Later attempts to set the future should return false. assertFalse(future.set(23)); assertFalse(future.setException(new Exception("bar"))); assertFalse(future.setFuture(SettableFuture.<Integer>create())); // Check that the future has been set properly. assertTrue(future.isDone()); assertFalse(future.isCancelled());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 7.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
return i; } }; List<Future<Integer>> futures = executor.invokeAll(Collections.nCopies(10, incrementTask)); for (int i = 0; i < 10; i++) { Future<Integer> future = futures.get(i); assertTrue("Task should have been run before being returned", future.isDone()); assertEquals(i, future.get().intValue()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 28.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java
* Future} instances to be upgraded to {@code ListenableFuture} after the fact. */ public static <V extends @Nullable Object> ListenableFuture<V> listenInPoolThread( Future<V> future) { if (future instanceof ListenableFuture) { return (ListenableFuture<V>) future; } return new ListenableFutureAdapter<>(future); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Dec 14 20:35:03 UTC 2023 - 7.5K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/FuturesGetChecked.java
@CanIgnoreReturnValue @ParametricNullness static <V extends @Nullable Object, X extends Exception> V getChecked( Future<V> future, Class<X> exceptionClass) throws X { return getChecked(bestGetCheckedTypeValidator(), future, exceptionClass); } /** Implementation of {@link Futures#getChecked(Future, Class)}. */ @CanIgnoreReturnValue @VisibleForTesting @ParametricNullness
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 17:40:56 UTC 2024 - 11.9K bytes - Viewed (0) -
src/test/java/jcifs/tests/WatchTest.java
} private void setupWatch ( SmbWatchHandle w ) throws InterruptedException { if ( this.future != null ) { this.future.cancel(true); } this.future = this.executor.submit(w); Thread.sleep(1000); } @Test public void testWatchCreate () throws CIFSException, MalformedURLException, UnknownHostException, InterruptedException, ExecutionException {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 8.4K bytes - Viewed (0) -
futures/listenablefuture1/src/com/google/common/util/concurrent/ListenableFuture.java
* result. (If you want such access, you may prefer {@link Futures#addCallback * Futures.addCallback}.) Still, direct {@code addListener} calls are occasionally useful: * * <pre>{@code * final String name = ...; * inFlight.add(name); * ListenableFuture<Result> future = service.query(name); * future.addListener(new Runnable() { * public void run() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jun 26 21:13:41 UTC 2023 - 8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ListenableFuture.java
* result. (If you want such access, you may prefer {@link Futures#addCallback * Futures.addCallback}.) Still, direct {@code addListener} calls are occasionally useful: * * <pre>{@code * final String name = ...; * inFlight.add(name); * ListenableFuture<Result> future = service.query(name); * future.addListener(new Runnable() { * public void run() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jun 26 21:13:41 UTC 2023 - 8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java
@GwtIncompatible public class MockFutureListener implements Runnable { private final CountDownLatch countDownLatch; private final ListenableFuture<?> future; public MockFutureListener(ListenableFuture<?> future) { this.countDownLatch = new CountDownLatch(1); this.future = future; future.addListener(this, directExecutor()); } @Override public void run() { countDownLatch.countDown(); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 18:12:42 UTC 2023 - 3K bytes - Viewed (0)