Question

I am new to wpf threading, now that we have backgroundworker and dispatcher classes, classic winforms threading issues are no longer a problem?

Was it helpful?

Solution

I have plenty of hands on threading experience in a professional situation, including quite a bit with WPF, and I can tell you that it does not solve any of these problems.

It is nicer than winforms in that the Dispatcher gives you a more clear idea of what the threading model is, but it doesn't go much further than that.

There isn't really much more that it could do even if they wanted to. Threading is an inherently complicated and ugly thing, and you can't just magically make it go away with a few GUI libraries

OTHER TIPS

You can still have all of these problems. WPF hasn't magically solved any threading issue. It just gives you a couple more tools to use. BackgroundWorker has been around for a while, and although useful, it is still just as possible to get deadlocks, race conditions, etc. The best cure for threading issues, is, as always, careful development and careful debugging.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top