tpl + ccr

时间:2022-05-11 15:26:35

不是非此即彼的场景。如下混合使用CCR+TPL的代码说明问题:
It's not an either/or scenario.You can intermix CCR and TPL code like this, here is a Parallel.For inside of a Receive delegate:

]));

, count, i =>
                    {
                        Console.Write(i.ToString()+" ");
                    });
                }
            ));
        }
    }
}