java中创建Completed future
2019年2月15日
java中创建Completed future
在Java中如何创建Completed future呢?
Java8中可以Future future = CompletableFuture.completedFuture(value);
Guava中可以Futures.immediateFuture(value)
Apache commons Lang中可以Future<T> future = ConcurrentUtils.constantFuture(T myValue);
Loading...