private void Do()
{
Task[] tasks = new Task[1];
Task task = new Task((param) =>
{
});
tasks[0] = task;
task.Start();
Task.WaitAll(tasks);//阻塞主线程
Task.WhenAll(tasks).ContinueWith(p =>//不阻塞主线程,而是回调
{
}
);
}