花仙子是什么意思| 熊喜欢吃什么食物| bf什么意思| 大米为什么会生虫| 孤独的最高境界是什么| 癫痫是什么意思| 贡眉是什么茶| 左边头痛什么原因| 孩子为什么不愿意上学| 月亮为什么是红色的| 考试吃什么早餐| 时光什么意思| 什么都想要| 边界欠清是什么意思| 小人痣代表什么意思| 经常自言自语是什么原因| 角逐是什么意思| 宫腔内稍高回声是什么意思| 为什么感冒会流鼻涕| 嫖娼什么意思| 卖什么意思| 在减肥期间吃什么最好| 骨折什么意思| 唇周围长痘痘是什么原因| 白细胞是什么意思| 黑色裤子配什么颜色t恤| 腮腺炎是什么原因引起的| 小鸟进屋有什么预兆吗| 大腿骨叫什么骨| 皮肤出现红点是什么原因| 封印是什么意思| 翻车了是什么意思| 什么神什么注| kawasaki是什么牌子| 甲状腺偏高有什么影响| 什么是业障| 日昳是什么意思| 对头是什么意思| 芥酸对身体有什么危害| cra是什么| 蛞蝓是什么动物| 健脾祛湿吃什么药效果最好| 下肢静脉曲张挂什么科| 饭前饭后吃药有什么区别| 浓茶喝多了有什么危害| 忘情水是什么意思| 精是什么意思| 玄学什么意思| 荔枝肉是什么菜系| 下体痒是什么原因| 裤子前浪后浪是什么| fe是什么元素| 10月24日什么星座| 心乱如什么| 子宫内膜回声欠均匀什么意思| 养老院靠什么挣钱| 哈喇子是什么意思| 南音是什么意思| 什么伤医院不能治| 米油是什么| 三月六日是什么星座| 鼻炎流鼻血是什么原因| 廉租房和公租房有什么区别| 梦见孩子被蛇咬是什么意思| 喉咙发炎咳嗽吃什么药好得快| 笑靥如花什么意思| 什么病不能吃丝瓜| 吃什么菜能降血糖| 草鱼喜欢吃什么食物| 梦见地震是什么意思| 风生水起是什么生肖| 君子什么意思| 右脸突然肿了是什么原因| 阴虚吃什么食物补得快| 为什么会放屁| 黄历冲生肖是什么意思| 短裙配什么鞋子好看| 仁字五行属什么| 炖牛肉放什么容易烂| 金棕色是什么颜色| 8月开什么花| 回煞是什么意思| 上发条是什么意思| 什么时候受孕率最高| 忌讳是什么意思| 毛囊炎用什么洗发水| 375是什么意思| 女人肺气虚吃什么补最快| aaa是什么意思| 云是什么生肖| 莫桑钻和钻石有什么区别| 五谷都有什么| 今天是什么日子 农历| 干事是什么意思| 多汗是什么原因| 什么样的你| 嗓子痒干咳是什么原因| 以备不时之需什么意思| 什么人不能吃石斛| 飞蛾为什么扑火| 骨肉相连是什么肉| 补休是什么意思| 肾b超能检查出什么| 胎停有什么症状| 肝异常一般是什么情况| 胃阳不足吃什么中成药| 王八羔子是什么意思| 4.20号是什么星座| 眼睛下面有痣代表什么| 双子座是什么性格| 十二指肠霜斑样溃疡是什么意思| 主动脉夹层是什么病| sdeer是什么牌子| c类火灾是指什么| ca199偏高是什么原因| 为什么不建议做冠脉cta检查| 马齿苋长什么样子| 月经期血块多是什么原因| 什么水果降血糖| 滚去掉三点水念什么| 痛风吃什么食物好得快| 孝是什么| 什么是bg| 做b超可以检查出什么| 高晓松为什么进监狱| 梦见火车脱轨什么预兆| 阴茎是什么| 仁慈是什么意思| 微信是什么时候开始有的| 崩大碗配什么煲汤最好| 癌胚抗原偏高说明什么| 杏林春暖的杏林指什么| 喝酸奶有什么好处| 什么菜不能吃| 什么金属最硬| 文曲星什么意思| 小肚子鼓鼓的什么原因| 什么情况下需要打破伤风针| 瑜伽是什么运动| 朗字五行属什么| 晚上尿多是什么病| 为什么会得幽门螺旋杆菌| 生菜是什么菜| 越南说什么语言| 阴历六月十八是什么日子| 颜面扫地什么意思| 血气方刚什么意思| 儿保科主要是检查什么| 一什么树干| 头热是什么原因| 四月十六日是什么星座| 庹在姓氏上读什么| 果子狸携带什么病毒| 6朵玫瑰代表什么意思| 6.19是什么日子| 补牙为什么要分三次| 三个龙读什么| 人大是干什么的| 肺大泡有什么症状| 什么血型最招蚊子| 黄精什么功效| cba什么时候开始比赛| 118什么意思| tf口红是什么牌子| 猪肝补什么| 慢阻肺吃什么药| 海里是什么单位| 969368是什么电话| 泻立停又叫什么名字| 办银行卡需要什么证件| 撩 是什么意思| 50pcs是什么意思| 宫外孕什么症状| 慈禧属什么生肖| 脾稍大什么意思| 补料是什么意思| 看心理医生挂什么科| o和b型生的孩子是什么血型| 什么什么不宁| 农历7月28日是什么星座| 喝什么水最好| 抹茶色是什么颜色| 什么是69| 突然眼睛充血是什么原因引起的| 手指头发红是什么原因| 流氓是什么意思| 就义是什么意思| 自言自语是什么| 骨科是什么梗| 读什么| 酸溜溜的什么| 膝盖后面叫什么| 成人感冒挂什么科| 脾虚要吃什么东西调理| 避重就轻是什么意思| bv中间型是什么意思| 结婚九年是什么婚| 夕阳西下是什么意思| 甲烷是什么| 早上吃玉米有什么好处| 电场是什么| 8月15号是什么日子| 稽留流产是什么原因| 渡劫什么意思| 什么药| 射手是什么星象| 移植后吃什么水果好| 哥德巴赫猜想是什么| 脚底有痣代表什么意思| 小孩子黑眼圈重是什么原因| 甜杆和甘蔗有什么区别| 漏斗胸为什么长不胖| 梦见找鞋子是什么意思| 什么叫数字货币| 三问表是什么意思| 霍金得了什么病| cto是什么意思| 心火旺失眠吃什么药| 长期拉肚子是什么原因| 雷锋属什么生肖| 天上的星星为什么会发光| 八路军为什么叫八路军| 眼睛突然红了是什么原因| 成因是什么意思| 什么是骨质疏松| 水杯什么品牌好| 雌激素是什么意思| 拔罐对身体有什么好处和坏处| 早餐可以吃什么| 无名指为什么叫无名指| 军士长是什么军衔| 中性粒细胞比率偏低是什么意思| 三伏天要注意什么| 西周王陵为什么找不到| 属猪的跟什么属相最配| 梦见黄金是什么意思| 血小板偏低是什么原因| 子宫什么样子图片| 酒后头疼吃什么药| 作壁上观是什么生肖| 7月23日什么星座| 蕈是什么意思| 意大利用的什么货币| 头发属于什么组织| sy什么意思| 空腹血糖受损是什么意思| 院感是什么意思| 中心句是什么意思| 子宫内膜薄有什么症状| 牛奶丝是什么面料| 电脑一体机什么牌子好| 肺部钙化是什么意思啊| 株连九族是什么意思| 孕妇腹泻可以吃什么药| 知了猴什么时候出来| 山不转水转是什么意思| 妇科菌群失调吃什么药| 替代品是什么意思| 什么可当| 利空是什么意思| 十月二十三号是什么星座| 什么操场| 浊是什么意思| 10月16日出生的是什么星座| 百度Jump to content

张蓝心运动广告大片曝光 姿势精准活力十足

From Wikipedia, the free encyclopedia
(Redirected from Task Parallel Library)
百度 宋茜演绎春季T恤+外套搭配Look  宋茜用飞行员夹克内搭字母T,红色系已经足够抢眼,胸口的字母增加几分细节。

.NET Store APIs
Async model
TPL
EF
WPF
WCF
WF
WCS
The .NET Framework stack

Parallel Extensions was the development name for a managed concurrency library developed by a collaboration between Microsoft Research and the CLR team at Microsoft. The library was released in version 4.0 of the .NET Framework.[1] It is composed of two parts: Parallel LINQ (PLINQ) and Task Parallel Library (TPL).[2][3] It also consists of a set of coordination data structures (CDS) – sets of data structures used to synchronize and co-ordinate the execution of concurrent tasks.[4]

Parallel LINQ

[edit]

PLINQ, or Parallel 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.[2] Any computation on objects that has been implemented as queries can be parallelized by PLINQ. However, the objects need to implement the IParallelEnumerable interface, which is defined by PLINQ itself. Internally it uses TPL for execution.[4][5]

Task Parallel Library

[edit]

The Task Parallel Library (TPL) is the task parallelism component of the Parallel Extensions to .NET.[6] It exposes parallel constructs like parallel For and ForEach loops, using regular method calls and delegates, thus the constructs can be used from any CLI languages. The job of spawning and terminating threads, as well as scaling the number of threads according to the number of available processors, is done by the library itself,[3] using a work stealing scheduler.[7]

TPL also includes other constructs like Task and 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 when their turn comes.

Future is a task that returns a result. The result is computed in a background thread encapsulated by the Future object, and the result is buffered until it is retrieved.[3] If an attempt is made to retrieve the result before it has been computed then the requesting thread will block until the result is available.[6]

The other construct of TPL is Parallel class. TPL provides a basic form of structured parallelism via three static methods in the Parallel class:

Parallel.Invoke
Executes an array of Action delegates in parallel, and then waits for them to complete
Parallel.For
Parallel equivalent of a C# for loop
Parallel.ForEach
Parallel equivalent of a C# foreach loop

Architecture

[edit]

The main concept in the Parallel Extensions to .NET is a Task, which is a small unit of code, usually represented as a lambda function, that can be executed independently. Both PLINQ and the TPL API provides methods to create the Tasks – PLINQ divides a query into smaller Tasks, and the Parallel.For, Parallel.ForEach and Parallel.Invoke methods divide a loop into Tasks.

PFX includes a Task Manager object which schedules the Tasks for execution. A Task Manager contains a global queue of Tasks, which are then executed. It also encapsulates multiple threads onto which the Tasks are executed. By default, as many threads as there are processors (or processor cores) on the system are created, though this number may be manually modified. Each thread is associated with a thread-specific queue of Tasks. When idle, each thread picks up a batch of Tasks and puts them on its local queue, where they are then executed, one by one. If the global queue is empty, a thread will look for Tasks in the queues of its peers, and will take the Tasks which have been in the queue the longest (task stealing). When in execution, the Tasks will be executed independently, with the change in state of one Task independent of others. As a result, if they use a shared resource, they still need to be synchronized manually using locks or other constructs.

See also

[edit]

References

[edit]
  1. ^ "What's New in the .NET Framework 4". Retrieved 21 September 2011.
  2. ^ a b "Programming in the Age of Concurrency: Concurrent Programming with PFX". Retrieved 16 October 2007.
  3. ^ a b c "MSDN Magazine: Task Parallel Library". Archived from the original on 14 October 2007. Retrieved 16 October 2007.
  4. ^ a b "June 2008 CTP – Parallel Extensions to the .NET FX". Retrieved 6 August 2008.
  5. ^ "More powerful aggregations in PLINQ". Retrieved 6 August 2008.
  6. ^ a b Duffy, Joe (2009). Concurrent Programming on Windows. pp. 887–929. ISBN 978-0321434821.
  7. ^ Leijen, Daan; Schulte, Wolfram; Burckhardt, Sebastian (2009). "The Design of a Task Parallel Library". ACM SIGPLAN Notices. 44 (10): 227. CiteSeerX 10.1.1.146.4197. doi:10.1145/1639949.1640106.
[edit]
为什么会得人工荨麻疹 什么的草叶 十月十日是什么星座 什么叫痛风 福禄寿什么意思
下颌骨紊乱挂什么科 6月1日什么星座 心肌缺血是什么意思 小孩血压高是什么原因 豆泡是什么
腱鞘炎用什么药最好 苯对人体有什么危害 最亮的星星是什么星 硅胶是什么材料 脂溢性皮炎吃什么药
全身酸痛是什么原因 怀孕什么时候开始孕吐 996是什么 憋不住尿是什么原因 是什么结构
即使什么也什么造句hcv8jop9ns0r.cn 脱水是什么意思hcv7jop9ns4r.cn 胃炎吃什么食物好hcv8jop6ns4r.cn 幽门杆菌是什么意思hcv8jop4ns0r.cn 姜不能和什么一起吃hcv9jop8ns3r.cn
龟是什么意思hcv9jop5ns6r.cn 版心是什么hcv8jop0ns1r.cn cln是什么意思hcv8jop8ns0r.cn 学护理需要什么条件hcv9jop2ns0r.cn 海苔是什么做的hcv7jop4ns6r.cn
硬脂酸镁是什么hcv9jop3ns0r.cn 枕头发黄是什么原因hcv7jop9ns8r.cn 蕾丝是什么hcv9jop3ns6r.cn 肠胃型感冒吃什么药hcv9jop1ns0r.cn 中国现在是什么社会zhongyiyatai.com
爽肤水和精华水有什么区别hcv7jop4ns6r.cn 11月23日是什么星座hcv7jop4ns7r.cn 什么是肺磨玻璃结节gangsutong.com 阴部潮湿是什么原因hcv7jop9ns9r.cn 心跳过慢吃什么药hcv8jop9ns2r.cn
百度