views:

632

answers:

2

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

+8  A: 

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.

Charlie
You are just a student. You might be right... Is there anyone with hands-on threading coding experience to answer this question?
The fact that he is "a" student (not "just a student") doesn't disqualify him from providing a very valid answer. I think the comment is uncalled for, please remove it.
jvanderh
Hahaha I may be "just a student" but I have experience in WPF through my internship. Furthermore, as "just a student" I know that these are problems INHERENT to threading, and cannot be fixed with libraries.
Charlie
@jvanderh, "uncalled for" ? lol"please remove it" ? lol
This answer is correct. There's not any magic here. You are still responsible for understanding these concepts and mitigating risks. If you lock a resource or write to a shared location, you'd best be sure you have your ducks in a row - this goes for any threading model. Regardless if you are writing your code as a homework assignment or a work assignment ;-)
Anderson Imes
+1  A: 

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

Orion Edwards