Bolts框架continueWith未完成代码执行



我有Task,它从服务器获取结果。在将数据存储到bolt的.continueWith中的数据库时,它被"立即完成"(在调试周期中发现)打断。

 this.someMethod.getStatements()
        .continueWith(new Continuation<List<Statement>, Object>() {
          @Override public Object then(Task<List<Statement>> task) {
            for (Statement statement : task.getResult()) {
              saveStatement(statement);
            }
            return null;
          }
        });

找到解决方案时,内部方法存在问题,该方法将数据存储到数据库中。

最新更新