{"id":55917,"date":"2010-04-19T09:00:00","date_gmt":"2010-04-19T09:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/pfxteam\/2010\/04\/19\/a-tour-of-various-tpl-options\/"},"modified":"2010-04-19T09:00:00","modified_gmt":"2010-04-19T09:00:00","slug":"a-tour-of-various-tpl-options","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/a-tour-of-various-tpl-options\/","title":{"rendered":"A Tour of Various TPL Options"},"content":{"rendered":"<p>The Task Parallel Library (TPL) exposes various options that give&nbsp;you more control over how tasks get scheduled and executed:<\/p>\n<ul>\n<li>Choose&nbsp;whether to&nbsp;optimize for&nbsp;fairness or for overheads when scheduling tasks.<\/li>\n<li>Specially mark tasks known to be long-running to help the scheduler execute efficiently.<\/li>\n<li>Create a task as attached or detached to the parent task.<\/li>\n<li>Schedule continuations that run if a task threw an exception or got cancelled.<\/li>\n<li>Run tasks synchronously.<\/li>\n<\/ul>\n<p>Joseph E. Hoag&#8217;s article <a title=\"A Tour of Various TPL Options\" href=\"https:\/\/services.social.microsoft.com\/feeds\/FeedItem?feedId=639a99a9-ff25-4062-b61d-a86ea9d66a06&amp;itemId=19f089a0-3d29-431b-b328-44cf6eb88498&amp;title=A+Tour+of+Various+TPL+Options&amp;uri=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fB%2fC%2fF%2fBCFD4868-1354-45E3-B71B-B851CD78733D%2fTPLOptionsTour.pdf&amp;k=2v3CADExey7MxBRD6lPwUopusWTfyt49LUrjLaoSAkI%3d\">A Tour of Various TPL Options<\/a> explains these options in detail, accompanied by examples of correct and incorrect uses.<\/p>\n<p>(This paper and many more are available through the Parallel Computing Developer Center on MSDN at <a href=\"http:\/\/msdn.microsoft.com\/en-us\/concurrency\/ee851578.aspx\"><font color=\"#dd4a21\">http:\/\/msdn.microsoft.com\/en-us\/concurrency\/ee851578.aspx<\/font><\/a>.)<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Task Parallel Library (TPL) exposes various options that give&nbsp;you more control over how tasks get scheduled and executed: Choose&nbsp;whether to&nbsp;optimize for&nbsp;fairness or for overheads when scheduling tasks. Specially mark tasks known to be long-running to help the scheduler execute efficiently. Create a task as attached or detached to the parent task. Schedule continuations that [&hellip;]<\/p>\n","protected":false},"author":481,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[7908],"tags":[7907,7922,7909,7912],"class_list":["post-55917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pfxteam","tag-net-4","tag-article-summary","tag-parallel-extensions","tag-task-parallel-library"],"acf":[],"blog_post_summary":"<p>The Task Parallel Library (TPL) exposes various options that give&nbsp;you more control over how tasks get scheduled and executed: Choose&nbsp;whether to&nbsp;optimize for&nbsp;fairness or for overheads when scheduling tasks. Specially mark tasks known to be long-running to help the scheduler execute efficiently. Create a task as attached or detached to the parent task. Schedule continuations that [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/55917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/481"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=55917"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/55917\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=55917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=55917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=55917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}