await divideWorkByTaskProvider.WhenAll(new DivideWorkOption { Action = o => { var item = o as DivideTaskInfo; if (item == null) return; for (var i = item.BeginIndex; i < item.EndIndex; i++) { var person = personInfo[(int)i]; //Do something..... Do(person).Wait(); } }, TaskNum = personInfo.Count < 10 ? 1 : 10, Count = personInfo.Count });