First knowledgeParallel Extension
Lazybee
With the popularization of dual-core processors, the era of multi-core processors has arrived. To adapt to this change and make full use of multi-core hardware resources, Microsoft is developing the next-generation parallel series framework ( Parallel FX ). Plinq (parallel LINQ) And TPL (task parallel liberary) Is the key component. At the same time, we are also increasing our efforts to develop our own excellent functional languages for concurrent applications. F # (The current version is 1.9.3rc ). Currently, Microsoft has PlinqAnd TPL Include in Parallel Extension In 2007 Year 12 Month, Microsoft launched Parallel Extension Of CTP Version (CommunityPreview version), you can use the following address Http://www.microsoft.com/downloads/details.aspx? Familyid = e848dc1d-5be3-4941-8705-024bc7f180ba & displaylang = en Download this version. Run the Installation File Parallelextensions_dec07ctp.msi Then C: \ Program Files Will be created Microsoft parallel extensions dec07 CTPDirectory, including documents, examples, and System. Threading. dll File (added GAC ), Plinq And TPL Is included in System. Threading. dll File . After the installation is complete, you can easily use parallel extensions to create your parallelProgram.
To usePlinq, You only need to simplySystem. Threading. dllAdd to application library, and then callSystem. LINQ. parallelquery. asparallelExtension Method. For example, we haveLINQCodeFragment:
String[] Words =New[] {"Welcome","","Beijing"};
(FromWordInWordsSelectProcess (Word). toarray ();
We can easily change itPlinqVersion:
String[] Words =New[] {"Welcome","","Beijing"};
(FromWordInWords. Asparallel () SelectProcess (Word). toarray ();
Is it easy? Of course, there will also be many precautions. I should go home and write them here first. Write later...