Multi-threading libraries for .NET

后端 未结 10 1738
挽巷
挽巷 2021-02-14 08:28

I used multiple threads in a few programs, but still don\'t feel very comfortable about it.

What multi-threading libraries for C#/.NET are out there and which advantages

相关标签:
10条回答
  • 2021-02-14 09:24

    You might want to look at the series of articles about threading patterns. Right now it has sample codes for implementing a WorkerThread and a ThreadedQueue.

    http://devpinoy.org/blogs/jakelite/archive/tags/Threading+Patterns/default.aspx

    0 讨论(0)
  • 2021-02-14 09:27

    My advise would be to get comfortable with the thread pool before you move to any other libraries. A lot of the framework code uses the thread pool, so even if you happen to find The Best Threads Library(TM), you will still have to work with the thread pool, so you really need to understand that.

    You should also keep in mind that a lot of work has been put into implementing the thread pool and tuning it. The upcoming version of .NET has numerous improvements triggered by the development the parallel libraries.

    In my point of view many of the "problems" with the current thread pool can be amended by knowing its strengths and weaknesses.

    0 讨论(0)
  • 2021-02-14 09:27

    I like this one http://www.codeplex.com/smartthreadpool

    0 讨论(0)
  • 2021-02-14 09:29

    You don't have to use the threadpool explicitly, you can use BeginInvoke-EndInvoke if you need async calls. It uses the threadpool behind the scenes. See here: http://msdn.microsoft.com/en-us/library/2e08f6yc.aspx

    0 讨论(0)
提交回复
热议问题