- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 802 for future (0.07 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/TestPlatform.java
} /** * Retrieves the result of a {@code Future} known to be done but uses the {@code get(long, * TimeUnit)} overload in order to test that method. */ static <V> V getDoneFromTimeoutOverload(Future<V> future) throws ExecutionException { checkState(future.isDone(), "Future was expected to be done: %s", future); try { return getUninterruptibly(future, 0, SECONDS); } catch (TimeoutException e) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 29 16:29:37 UTC 2024 - 2.6K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java
* Future, then a call setException() would likely also overflow. * * - If the stack overflowed after set()/setValue() stored its result, then a call to * setException() will be a no-op because the Future is already done. * * Both scenarios are bad: The output Future might never complete, or, if it does complete, it
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 11K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java
taskDone = true; return taskDone; } }; List<Future<Boolean>> futureList = executor.invokeAll(ImmutableList.of(task), 10, MILLISECONDS); Future<Boolean> future = futureList.get(0); assertFalse(taskDone); assertTrue(future.isDone()); assertThrows(CancellationException.class, () -> future.get()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.7K bytes - Viewed (0) -
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) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/interval/impl/HostIntervalControllerTest.java
// Callableタスク(複数)を実行する final ExecutorService executor = Executors.newFixedThreadPool(numTasks); try { final List<Future<Integer>> futures = executor.invokeAll(tasks); for (final Future<Integer> future : futures) { future.get(); } } catch (final InterruptedException e) { // no thing to do } catch (final ExecutionException e) {
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 3.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java
try { List<Future<int[]>> futures = newArrayListWithExpectedSize(nTasks); for (int i = 0; i < nTasks; i++) { futures.add(pool.submit(new MutateTask(multiset, keys))); } int[] deltas = new int[3]; for (Future<int[]> future : futures) { int[] taskDeltas = future.get(); for (int i = 0; i < deltas.length; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java
} @Override public void onFailure(Throwable t) { failureCalls[0]++; } }; addCallback(future, callback, directExecutor()); future.set(result); assertEquals(result, future.get()); assertThat(successCalls[0]).isEqualTo(1); assertThat(failureCalls[0]).isEqualTo(0); } public void testOnSuccessThrowsError() throws Exception {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 6.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/QueuesTest.java
Future<?> possiblyIgnoredError = threadPool.submit(new Producer(q, 20)); @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored Future<?> possiblyIgnoredError1 = threadPool.submit(new Producer(q, 20)); @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 12.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedInputs.java
static final Future<String> FAILED_FUTURE_OTHER_THROWABLE = immediateFailedFuture(OTHER_THROWABLE); static final Error ERROR = new Error("mymessage"); static final Future<String> FAILED_FUTURE_ERROR = immediateFailedFuture(ERROR); static final Future<String> RUNTIME_EXCEPTION_FUTURE = UncheckedThrowingFuture.throwingRuntimeException(RUNTIME_EXCEPTION);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 13:46:56 UTC 2023 - 6.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
assertFalse(future.isCancelled()); ExecutorService executor = Executors.newSingleThreadExecutor(); try { Future<Boolean> getResult = executor.submit(() -> future.get()); // Release the future value. latch.countDown(); assertTrue(getResult.get(10, SECONDS)); } finally { executor.shutdownNow(); } assertTrue(future.isDone());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 18:30:30 UTC 2023 - 6K bytes - Viewed (0)