How to achieve parallel computing process in C# 4.0.
如何在C#4.0中实现并行计算过程。
3 个解决方案
#2
All of the parallelization options in .NET 3.5 will exist in C# 4.0.
.NET 3.5中的所有并行化选项都将存在于C#4.0中。
However, the Task Parallel Library will be moved into System.Threading directly as part of the BCL. This will allow constructs like Parallel.For loops, using the new TaskScheduler, etc.
但是,任务并行库将作为BCL的一部分直接移动到System.Threading中。这将允许像Parallel.For循环这样的构造,使用新的TaskScheduler等。
Also, PLINQ will be included in the BCL in .NET 4, which allows for parallel queries to be run.
此外,PLINQ将包含在.NET 4中的BCL中,它允许运行并行查询。
#3
You can play with the Task Parallel Library on VS 2008 by downloading the CTP here:
您可以在此处下载CTP来使用VS 2008上的任务并行库:
Or you can try the Dev 10 beta here if you're an MSDN subscriber:
或者,如果您是MSDN订阅者,可以尝试使用Dev 10 beta:
[see comment SO thinks I'm a spammer]
[见评论SO认为我是垃圾邮件发送者]
There are changes between the two versions in terms of namespaces and some APIs have been tweaked but either will get you started.
两个版本在命名空间方面有变化,一些API已经过调整,但要么会让你开始。
Ade
#1
By using Task Parallel Library, for example.
例如,通过使用任务并行库。
#2
All of the parallelization options in .NET 3.5 will exist in C# 4.0.
.NET 3.5中的所有并行化选项都将存在于C#4.0中。
However, the Task Parallel Library will be moved into System.Threading directly as part of the BCL. This will allow constructs like Parallel.For loops, using the new TaskScheduler, etc.
但是,任务并行库将作为BCL的一部分直接移动到System.Threading中。这将允许像Parallel.For循环这样的构造,使用新的TaskScheduler等。
Also, PLINQ will be included in the BCL in .NET 4, which allows for parallel queries to be run.
此外,PLINQ将包含在.NET 4中的BCL中,它允许运行并行查询。
#3
You can play with the Task Parallel Library on VS 2008 by downloading the CTP here:
您可以在此处下载CTP来使用VS 2008上的任务并行库:
Or you can try the Dev 10 beta here if you're an MSDN subscriber:
或者,如果您是MSDN订阅者,可以尝试使用Dev 10 beta:
[see comment SO thinks I'm a spammer]
[见评论SO认为我是垃圾邮件发送者]
There are changes between the two versions in terms of namespaces and some APIs have been tweaked but either will get you started.
两个版本在命名空间方面有变化,一些API已经过调整,但要么会让你开始。
Ade