问题描述
CompletableFuture.allOf(saveVirtualGeoDataCompletable).thenRun(() -> {
final AtomicInteger j = new AtomicInteger(0);
allBuildings.stream().forEach(building -> {
final List<GenericFloor> floors = building.getFloors();
if (CollectionUtils.isNotEmpty(floors)) {
floors.stream().forEach(floor -> {
if (CollectionUtils.isNotEmpty(floor.getAreas())) {
floor.getAreas().forEach(area -> {
CompletableFuture.runAsync(
() -> persistData(area,floor.toIdentity(),principal),configDataTaskExecutor);
});
}
});
}
});
});
如何在 RunAsync 中实现 runAsync。我想等到allOf第一组期货完成,然后再执行新的期货组
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)