Uses of Class
com.github.phantomthief.concurrent.TryWaitFutureUncheckedException
-
Packages that use TryWaitFutureUncheckedException Package Description com.github.phantomthief.concurrent -
-
Uses of TryWaitFutureUncheckedException in com.github.phantomthief.concurrent
Methods in com.github.phantomthief.concurrent that throw TryWaitFutureUncheckedException Modifier and Type Method Description static <F extends Future<V>,V>
Map<F,V>MoreFutures. tryWait(Iterable<F> futures, long timeout, TimeUnit unit)A typical usage:<pre> // a fail-safe example List<Future<User>> list = doSomeAsyncTasks(); Map<Future<User>, User> success; try { success = tryWait(list, 1, SECONDS); } catch (TryWaitUncheckedException e) { success = e.getSuccess(); // there are still some success } // a fail-fast example List<Future<User>> list = doSomeAsyncTasks(); // don't try/catch the exception it throws. Map<Future<User>, User> success = tryWait(list, 1, SECONDS); </pre>static <F extends Future<V>,V>
Map<F,V>MoreFutures. tryWait(Iterable<F> futures, Duration duration)
-