//多重认证 Parallel.Invoke(() => { jianYanResult = new VerifiedMobileService().CheckMobileFun(request.phone_number); LogUtils.Debug("const_id:" + request.const_id + " mobile:" + phone_number + " MobileFun", "PassJianYan", "01"); }, () => { dxResult = SecRiskApi(request); LogUtils.Debug("const_id:" + request.const_id + " mobile:" + phone_number + " RISK", "PassJianYan", "02"); });
jianYanResult 、dxResult 为前置定义变量; 两个代码块并行执行;