调用多个方法,我想同时调用它们,应该等待彼此完成。
else {
PricingFromS4Request pricingRequest = new PricingFromS4Request();
ProductFromS4Request productRequest = new ProductFromS4Request();
PricingFromS4ServiceImpl service = new PricingFromS4ServiceImpl();
//Create 1 thread for below line
pricingRequest = service.createS4PricingRequest(ABeanObject, SomeArrayList);
//Create 1 more thread for below line
productRequest = service.createS4ProductRequest(SomeList);
//Send pricingRequest and productRequest into another method
SomeMethod(pricingRequest,productRequest);
}
无法将两行放在线程内
肥皂起泡泡
相关分类