„Parallel Extensions“ – Versionsunterschied
[ungesichtete Version] | [ungesichtete Version] |
Inhalt gelöscht Inhalt hinzugefügt
Mention JSR 166 |
some minor cleanup |
||
Zeile 1:
{{future software}}
[[Image:DotNet.svg|thumb|right|250px|The [[.NET Framework]] stack.]]
'''Parallel Extensions''', previously known as the Parallel Framework Extensions or ('''PFX'''), is a [[Managed code|managed]] [[Concurrent programming|concurrency]] [[Library (computing)|library]] being developed by a collaboration between [[Microsoft Research]] and the [[Common Language Runtime|CLR]] team at [[Microsoft]]. It is composed of two parts:
==
{{see also|Language Integrated Query}}
'''Parallel LINQ''' ('''PLINQ''') is a concurrent query execution engine for [[Language Integrated Query|LINQ]], parallelizing the execution of queries on objects (LINQ to Objects) and XML data (LINQ to XML). PLINQ is intended for exposing [[data parallelism]] by use of queries.<ref name="channel9"/> Any computation on objects that has been implemented as queries can be parallelized by PLINQ. However, the objects need to implement the <code>IParallelEnumerable</code> interface, which is defined by PLINQ itself. Internally it uses [[#Task Parallel Library|TPL]] for execution.<ref name="somajune">{{cite web | url = http://blogs.msdn.com/somasegar/archive/2008/06/02/june-2008-ctp-parallel-extensions-to-the-net-fx.aspx | title = June 2008 CTP - Parallel Extensions to the .NET FX | accessdate = 2008-08-06}}</ref><ref>{{cite web | url = http://blogs.msdn.com/pfxteam/archive/2008/06/05/8576194.aspx | title = More powerful aggregations in PLINQ | accessdate = 2008-08-06}}</ref>
==Task Parallel Library==
The '''Task Parallel Library''' ('''TPL''') is the [[task parallelism]] component of the Parallel Extensions to .NET.<ref name="Concurrent Programming on Windows Appendix B"/> It exposes parallel constructs like parallel <code>For</code> and <code>ForEach</code> loops, using regular method calls and [[Delegate (.NET)|delegates]]. As such, the constructs can be used from any language supporting the [[.NET Framework]]. The job of spawning and terminating [[Thread (computing)|threads]], as well as scaling the number of threads according to the number of available processors, is done by the library itself.<ref name="msdnmag"/>
TPL also includes other constructs such as ''Task'' and ''[[Future (programming)|Future]]''. A ''Task'' is an action that can be executed independent of the rest of the program. In that sense, it is semantically equivalent to a thread, except that it is a more light-weight object and comes without the overhead of creating an OS thread. Tasks are queued by a ''Task Manager'' object and are scheduled to run on multiple OS threads in a [[thread pool pattern|thread pool]] when their turn comes.
|