Skip to main content
Microsoft
.NET Parallel Programming
.NET Parallel Programming
  • Home
  • DevBlogs
    • Visual Studio
    • Visual Studio Code
    • Visual Studio for Mac
    • DevOps
    • Developer support
    • CSE Developer
    • Azure SDK
    • IoT
    • Command Line
    • Perf and Diagnostics
    • Dr. International
    • Notification Hubs
    • Math in Office
    • DirectX
    • PIX
    • SurfaceDuo
    • Startups
    • Sustainable Engineering
    • C++
    • Java
    • Java Blog in Chinese
    • JavaScript
    • PowerShell Community
    • PowerShell Team
    • Python
    • Q#
    • TypeScript
    • Visual Basic
    • Visual C#
    • Visual F#
    • .NET
    • ASP.NET
    • NuGet
    • Xamarin
    • #ifdef Windows
    • Apps for Windows
    • Azure Depth Platform
    • Azure Government
    • Bing Dev Center
    • Microsoft Edge Dev
    • Microsoft Azure
    • Office 365 Development
    • Old New Thing
    • Windows MIDI and Music dev
    • Windows Search Platform
    • Azure Cosmos DB
    • Azure Data Studio
    • Azure SQL
    • OData
    • Revolutions R
    • SQL Server Data Tools

    .NET Parallel Programming

    All about Async/Await, System.Threading.Tasks, System.Collections.Concurrent, System.Linq, and more…

    March 2012 | .NET Parallel Programming

    Do I need to dispose of Tasks?
    Do I need to dispose of Tasks?
    Avatar Stephen Toub - MSFT March 25, 2012 Mar 25, 2012 03/25/12
    I get this question a lot: “Task implements IDisposable and exposes a Dispose method.  Does that mean I should dispose of all of my tasks?” SummaryHere’s my short answer to this question: “No.  Don’t bother disposing of your tasks.”Here’s my medium-length answer: “No.  Don&...

    Comments are closed.0.NET 4.NET 4.5
    Should I expose asynchronous wrappers for synchronous methods?
    Should I expose asynchronous wrappers for synchronous methods?
    Avatar Stephen Toub - MSFT March 24, 2012 Mar 24, 2012 03/24/12
    Lately I’ve received several questions along the lines of the following, which I typically summarize as “async over sync”: In my library, I have a method “public T Foo();”.  I’m considering exposing an asynchronous method that would simply wrap the synchronous one, e.g. “public Task<T> ...

    Comments are closed.0.NET 4.NET 4.5
    Is it ok to use nested Parallel.For loops?
    Is it ok to use nested Parallel.For loops?
    Avatar Stephen Toub - MSFT March 14, 2012 Mar 14, 2012 03/14/12
    Every now and then, I get this question: “is it ok to use nested Parallel.For loops?” The short answer is “yes.”  As is often the case, the longer answer is, well, longer. Typically when folks ask this question, they’re concerned about one of two things.  First, they’re concerned that each nested loop will assume it “...

    Comments are closed.0.NET 4Parallel Extensions
    Are you using TPL Dataflow?  We’d love to know!
    Are you using TPL Dataflow? We’d love to know!
    Avatar Stephen Toub - MSFT March 6, 2012 Mar 6, 2012 03/6/12
    Are you using the new System.Threading.Tasks.Dataflow.dll library, either from its CTPs or from the .NET 4.5 Developer Preview or Beta?  We'd love to hear about it, and if you have time, what your experiences have been (good or bad).  What kind of solution are you building, and how are you using TPL Dataflow in it?  Has the ...

    Comments are closed.0.NET 4.NET 4.5
    Implementing a simple ForEachAsync, part 2
    Implementing a simple ForEachAsync, part 2
    Avatar Stephen Toub - MSFT March 5, 2012 Mar 5, 2012 03/5/12
    After my previous post, I received several emails and comments from folks asking why I chose to implement ForEachAsync the way I did.  My goal with that post wasn’t to prescribe a particular approach to iteration, but rather to answer a question I’d received… obviously, however, I didn’t provide enough background...

    2.NET 4.5Async
    Implementing a simple ForEachAsync
    Implementing a simple ForEachAsync
    Avatar Stephen Toub - MSFT March 4, 2012 Mar 4, 2012 03/4/12
    Jon Skeet recently asked me how I might go about implementing the following “asynchronous ForEach” behavior: Given what we now know about SemaphoreSlim from my previous post, here’s one way to achieve this: public static Task ForEachAsync<TSource, TResult>(     this IEnumerable<TSource...

    Comments are closed.0.NET 4.5Async
    Visual Studio 11 Beta currently incompatible with AsyncCtpLibrary*.dll
    Visual Studio 11 Beta currently incompatible with AsyncCtpLibrary*.dll
    Avatar Stephen Toub - MSFT March 3, 2012 Mar 3, 2012 03/3/12
    The C# and Visual Basic compilers implement support for async/await by generating code that utilizes some specific types in the underlying framework.  These types include the “awaiters” used to await things (like Tasks) as well as the “builders” used in handling the lifetime of an async method’s invocation. ...

    Comments are closed.0
    “The Zen of Async” at the MVP Summit 2012
    “The Zen of Async” at the MVP Summit 2012
    Avatar Stephen Toub - MSFT March 3, 2012 Mar 3, 2012 03/3/12
    Thanks to everyone who attended my "The Zen of Async" presentation on Thursday at the MVP Summit.  As I've had several requests, here are the slides and code for the talk. Toub_MVPSummit2012_ZenOfAsync.zip...

    Comments are closed.0.NET 4.5Async
    Relevant Links

    corefx repository on GitHub

    .NET

    Microsoft Azure

    Top Bloggers
    Archive
  • February 2015
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • November 2010
  • October 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • Stay informed

    Login
    Code Block
    What's new
    • Surface Duo
    • Surface Laptop Go
    • Surface Pro X
    • Surface Go 2
    • Surface Book 3
    • Microsoft 365
    • Windows 10 apps
    • HoloLens 2
    Microsoft Store
    • Account profile
    • Download Center
    • Microsoft Store support
    • Returns
    • Order tracking
    • Virtual workshops and training
    • Microsoft Store Promise
    • Financing
    Education
    • Microsoft in education
    • Office for students
    • Office 365 for schools
    • Deals for students & parents
    • Microsoft Azure in education
    Enterprise
    • Azure
    • AppSource
    • Automotive
    • Government
    • Healthcare
    • Manufacturing
    • Financial services
    • Retail
    Developer
    • Microsoft Visual Studio
    • Windows Dev Center
    • Developer Center
    • Microsoft developer program
    • Channel 9
    • Microsoft 365 Dev Center
    • Microsoft 365 Developer Program
    • Microsoft Garage
    Company
    • Careers
    • About Microsoft
    • Company news
    • Privacy at Microsoft
    • Investors
    • Diversity and inclusion
    • Accessibility
    • Security
    English (United States)
    • Sitemap
    • Contact Microsoft
    • Privacy
    • Manage cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2021