How to write safe/correct multi-threaded code in .NET?

前端 未结 5 1366
北恋
北恋 2021-01-30 04:50

Today I had to fix some older VB.NET 1.0 code which is using threads. The problem was with updating UI elements from the worker thread instead of the UI-thread. It took me some

5条回答
  •  抹茶落季
    2021-01-30 05:04

    These are the steps to writing quality (easier to read and understand) multi threaded code:

    1. Check out the Power Threading Library by Jeffrey Richter
    2. Watch the video - be amazed
    3. Take some time to gain a more in depth understanding of what's really going on, read the 'Concurrent Affair's articles found here.
    4. Start writing robust, safe multi threaded apps!
    5. Realise it's still not that simple, make some mistakes and learn from them ...repeat...repeat...repeat :-)

提交回复
热议问题