A Tour of ParallelExtensionsExtras

Throughout the development of Parallel Extensions for the .NET Framework 4, we’ve come across a myriad of situations where certain functionality would be useful in developing a particular application or library, but where that functionality isn’t quite encapsulated in the bits we’re shipping. Sometimes this functionality is too application-specific to be included in the core of the Framework, and other times we haven’t been sure how broadly applicable the functionality is, nor did we have the time to fully design it, test it, solicit feedback on it, and so forth.

Luckily, in the vast majority of these cases, we’ve been able to build this functionality on top of the parallelizatino constructs provided in .NET 4, in some cases simply containing .NET 4 types and methods, and in other cases taking advantage of extensibility points provided in .NET 4 for the explicit purpose of enabling developers to provide their own customized functionality where the Framework leaves off. Over time, we’ve amassed a wealth of code of this ilk, and we’ve chosen to expose most of it through the ParallelExtensionsExtras project available as part of our .NET 4 samples, which can be downloaded at http://code.msdn.microsoft.com/ParExtSamples.

ParallelExtensionsExtras is not a fully tested nor stable code base, and we’re continually augmenting it with additional functionality, but it does provide a wealth of code you can use as a starting point for your own solutions or simply as a learning tool to understand how various kinds of functionality might be implemented. Starting today, we’ll be presenting a series of blog posts in which we’ll walk through a subset of this functionality, detailing its implementation and discussing how and when such functionality would be applicable. If you have any requests, questions, or comments along the way, please do let us know. In particular, we’re very interested in knowing what, if any, of this functionality you’d be interested in seeing productized and included in the .NET Framework in the future.

Enjoy!

Posts thus far in the series:

  1. LINQ to Tasks

  2. Task<TResult>.ToObservable
  3. Additional Task Extensions Methods
  4. BlockingCollectionExtensions
  5. StaTaskScheduler
  6. ConcurrentExclusiveInterleave
  7. Additional TaskSchedulers
  8. ReductionVariable<T>
  9. ObjectPool<T>
  10. Pipeline
  11. ParallelDynamicInvoke
  12. AsyncCache
  13. AsyncCall
  14. SingleItemPartitioner
  15. Specialized Task Waiting
  16. Async Tasks for WebClient, SmtpClient, and Ping
  17. More to come...

Code:https://code.msdn.microsoft.com/ParExtSamples

时间: 2024-08-20 23:00:30

A Tour of ParallelExtensionsExtras的相关文章

F - Free DIY Tour(动态规划)

这道题也可以用深搜做,可以深搜本来就不熟,好久没做早忘了,明天看看咋做的 Description Weiwei is a software engineer of ShiningSoft. He has just excellently fulfilled a software project with his fellow workers. His boss is so satisfied with their job that he decide to provide them a free

HDU 1853 Cyclic Tour(最小费用最大流)

Cyclic Tour Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/65535 K (Java/Others) Total Submission(s): 1879    Accepted Submission(s): 938 Problem Description There are N cities in our country, and M one-way roads connecting them. Now L

UVALive 4848 Tour Belt

F - Tour Belt Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submit Status Practice UVALive 4848 Description Korea has many tourist attractions. One of them is an archipelago (Dadohae in Korean), a cluster of small islands sca

POJ 2135 Farm Tour &amp;&amp; HDU 2686 Matrix &amp;&amp; HDU 3376 Matrix Again 费用流求来回最短路

累了就要写题解,最近总是被虐到没脾气. 来回最短路问题貌似也可以用DP来搞,不过拿费用流还是很方便的. 可以转化成求满流为2 的最小花费.一般做法为拆点,对于 i 拆为2*i 和 2*i+1,然后连一条流量为1(花费根据题意来定) 的边来控制每个点只能通过一次. 额外添加source和sink来控制满流为2. 代码都雷同,以HDU3376为例. #include <algorithm> #include <iostream> #include <cstring> #in

Codeforces 490F Treeland Tour(离散化 + 线段树合并)

题目链接 Treeland Tour 题目就是让你求树上LIS 先离散化,然后再线段树上操作.一些细节需要注意一下. #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i(a); i <= (b); ++i) #define dec(i, a, b) for (int i(a); i >= (b); --i) typedef long long LL; const int N =

hdoj 3488 Tour 【最小费用最大流】【KM算法】

Tour Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 2299    Accepted Submission(s): 1151 Problem Description In the kingdom of Henryy, there are N (2 <= N <= 200) cities, with M (M <= 3000

HDU3488 Tour [有向环覆盖 费用流]

Tour Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 3159    Accepted Submission(s): 1525 Problem Description In the kingdom of Henryy, there are N (2 <= N <= 200) cities, with M (M <= 30000

POJ 1637 Sightseeing tour (混合图欧拉回路)

Sightseeing tour Description The city executive board in Lund wants to construct a sightseeing tour by bus in Lund, so that tourists can see every corner of the beautiful city. They want to construct the tour so that every street in the city is visit

A Swifr Tour

Tradition suggests that the first program in a new language should print the words "Hello ,world!" on the screen. In Swift , this can be done in a single line :  print("Hello world") If you gave written code in C otr Objective - C , th