一个人怎么能管理,以充分利用新的增强的并行特性在.NET 4.0中? [英] How can one manage to fully use the newly enhanced Parallelism features in .NET 4.0?

查看:122
本文介绍了一个人怎么能管理,以充分利用新的增强的并行特性在.NET 4.0中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是pretty的多大兴趣到使用新增强的并行特性在.NET 4.0中。

I am pretty much interested into using the newly enhanced Parallelism features in .NET 4.0.

我也看到了使用它在F#中,尽可能在C#的一些可能性。

I have also seen some possibilities of using it in F#, as much as in C#.

尽管如此,我只能看到PLINQ,是您在,例如,以下内容:

Despite, I can only see what PLINQ has to offer with, for example, the following:

var query = from c in Customers.AsParallel()
            where (c.Name.Contains("customerNameLike"))
            select c;

有一定可以肯定会有一些其他使用这种并行的事情。

There must for sure be some other use of this parallelism thing.

你有没有使用它的任何其他的例子吗?难道这尤其是针对PLINQ转身,还是有其他用途的PLINQ一样容易?

Have you any other examples of using it? Is this particularly turned toward PLINQ, or are there other usage as easy as PLINQ?

谢谢! =)

推荐答案

在.NET 4.0中提供的新的并行编程功能不局限于只是PLINQ。

The new parallel programming features provided in .NET 4 are not limited to just PLINQ.

正如微软: Visual Studio 2010和.NET Framework 4的提升并行编程支持,提供了一个新的运行时,新的类库类型和新的诊断工具,这些特性简化并行开发,这样你可以编写高效,精细的,可伸缩的并行code在一个自然的习惯用法,而无需直接使用线程或线程池的工作。

我会建议您在查看并行编程.NET框架作为一个很好的起点。

I would recommend that you review Parallel Programming in the .NET Framework as a good starting place.

总体而言,.NET 4和Visual Studio 2010提供了以下功能:

Overall, .NET 4 and Visual Studio 2010 provide these features:

我个人已经找到了工作和任务【T】类任务并行库创建和协调异步工作的时候更加灵活。

I personally have found the Task and Task{T} classes in the Task Parallel Library to be more flexible when creating and coordinating asynchronous work.

这篇关于一个人怎么能管理,以充分利用新的增强的并行特性在.NET 4.0中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆