Available parallel technologies in .Net

前端 未结 6 1304
星月不相逢
星月不相逢 2021-02-04 10:58

I am new to .Net platform. I did a search and found that there are several ways to do parallel computing in .Net:

  1. Parallel task in Task Parallel Library, which

6条回答
  •  不知归路
    2021-02-04 11:42

    two major ways to do parallel are threads and the new task based library TPL.

    Asynchronous Programming you mention is nothing more then one new thread in the threadpool.

    PLINQ, Rx and others mentioned are actually extensions sitting on the top of the new task scheduler.

    the best article explaining exactly the new architecture for new task scheduler and all libraries on the top of it, Visual Studio 2010 and new TPL .NET 4.0 Task-based Parallelism is here (by Steve Teixeira, Product Unit Manager for Parallel Developer Tools at Microsoft):

    http://www.drdobbs.com/visualstudio/224400670

    otherwise Dr Dobbs has dedicated parallel programming section here: http://www.drdobbs.com/go-parallel/index.jhtml

    The main difference between say threads and new task based parallel programming is you do not need to think anymore in terms of threads, how do you manage pools and underlying OS and hardware anymore. TPL takes care for that you just use tasks. That is a huge change in the way you do parallel on any level including abstraction.

    So in .NET actually you do not have many choices:

    1. Thread
    2. New task based, task scheduler.

    Obviously the task based is the way to go.

    cheers Valko

提交回复
热议问题