Java 输入流->;readline块执行,如何从CompletableFuture获得部分结果?
使用bufferedStreamReader.readline读取可能会阻止执行,我想使用CompletableFuture实现并设置超时,但是如何获得执行的部分结果呢?比方说,CompletableFuture作为TimeoutException被取消后的长时间读取 它只能在您从网络读取时阻止执行,在这种情况下,您应该使用读取超时。它只能在您从网络读取时阻止执行,在这种情况下,您应该使用读取超时。Java 输入流->;readline块执行,如何从CompletableFuture获得部分结果?,java,multithreading,completable-future,Java,Multithreading,Completable Future,使用bufferedStreamReader.readline读取可能会阻止执行,我想使用CompletableFuture实现并设置超时,但是如何获得执行的部分结果呢?比方说,CompletableFuture作为TimeoutException被取消后的长时间读取 它只能在您从网络读取时阻止执行,在这种情况下,您应该使用读取超时。它只能在您从网络读取时阻止执行,在这种情况下,您应该使用读取超时。