Multi-threading libraries for .NET

后端 未结 10 1752
挽巷
挽巷 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:11

    For me the builtin classes of the Framework are more than enough. The Threadpool is odd and lame, but you can write your own easily.

    I often used the BackgroundWorker class for Frontends, cause it makes life much easier - invoking is done automatically for the eventhandlers.

    I regularly start of threads manually and safe them in an dictionary with a ManualResetEvent to be able to examine who of them has ended already. I use the WaitHandle.WaitAll() Method for this. Problem there is, that WaitHandle.WaitAll does not acceppt Arrays with more than 64 WaitHandles at once.

提交回复
热议问题