所有,我有一个名为的通用方法TaskSpin,在这个方法中我启动了Task一个关联的continutation 
public TaskSpin(Func asyncMethod, object[] methodParameters)
{
    ...
    asyncTask = Task.Factory.StartNew<bool>(() => 
        asyncMethod(uiScheduler, methodParameters));
    asyncTask.ContinueWith(task =>
    {
        // Finish the processing update UI etc.
    }
    ...
}
现在的问题是我想使用 运行多个方法TaskSpin,但我需要限制方法一次运行一个。所以 foreach 行中的一些DataGridView我想做类似的事情
foreach (DataGridViewRow row in this.DataGridViewUrg.Rows)
    TaskSpin(Run(DrgDataRowInfo(row.Index)));
但是,在上述方法中,该TaskSpin方法将立即退出,从而导致TaskSpin在另一个线程上分离下一个方法。这不好,因为该Run方法写入一组通用文件。将这些作业排队的最佳方式是什么?