ParallelFX: Armed and Dangerous

Warning: Illegal string offset 'status_txt' in /homepages/30/d169642629/htdocs/brilliant/blog/wp-content/plugins/share-and-follow/share-and-follow.php on line 1093

Warning: Illegal string offset 'status_txt' in /homepages/30/d169642629/htdocs/brilliant/blog/wp-content/plugins/share-and-follow/share-and-follow.php on line 1093

Warning: Illegal string offset 'status_txt' in /homepages/30/d169642629/htdocs/brilliant/blog/wp-content/plugins/share-and-follow/share-and-follow.php on line 1105

Warning: Illegal string offset 'status_txt' in /homepages/30/d169642629/htdocs/brilliant/blog/wp-content/plugins/share-and-follow/share-and-follow.php on line 1132

Warning: Illegal string offset 'status_txt' in /homepages/30/d169642629/htdocs/brilliant/blog/wp-content/plugins/share-and-follow/share-and-follow.php on line 1093

Warning: Illegal string offset 'status_txt' in /homepages/30/d169642629/htdocs/brilliant/blog/wp-content/plugins/share-and-follow/share-and-follow.php on line 1122

Last Tuesday I attended a presentation by Rob Windsor of the TVBUG user group on the new parallel extensions in .Net 4. I had tried out some of the extensions back when ParallelFX was still an RC candidate, but the Task class and all its cool chaining features were all new to me. While I’m excited to see threading made so much easier, I also have to admit it frightens me. Rob jokingly quoted someone suggesting that Visual Studio should throw compile-time errors if you try to use threading without the appropriate Microsoft certification, but it’d probably have my vote if it was technically feasible and didn’t do something stupid like choose Sarah Palin as a running mate.

There’s a fair chunk of developers who have little to no experience writing multi-threaded applications.  Scarier still are the newcomers who skipped the c++ generation and think the c# “lock” statement is the foundation for all resource synchronization in the windows operating system — yes, I interviewed someone who quite boldly threw that gem out while I did my best not to giggle… While technologies such as WPF make writing Windows programs so much easier in many ways, they also present new and interesting ways to shoot yourself in the foot with threads. I recently updated KidStarter to load Start Menu icons in a background thread to improve the user experience. It seemed pretty straightforward for someone who’s been knee-deep in multi-threading for over a decade now, but I still managed to get tripped up by WPF’s various delay-loading performance optimizations and spent a couple of days debugging the problem.

I’m the last person to discourage people from diving in, getting burnt and learning from the experience. Those are the only people I would ever hire for a job. Just make sure you either do it on your own time or have enough time in your project schedule to absorb the inevitable mistakes and extra bugs ;) Having said that, ParallelFX is a well-designed framework that does a great job of alleviating a lot of the pain in using threads to increase your app’s performance, making better use of system resources, and ultimately providing a better user experience. I look forward to digging into it more (and possibly re-writing my Start Menu code…)

About Dan Drew

Dan has worked in the software industry for almost 15 years as a developer, architect and manager at industry leaders such as Delrina, Microsoft and MySpace. The results of his work are used by millions of users in the home, corporate, and Internet markets.
This entry was posted in Development, Software, Technology, Windows. Bookmark the permalink.

Comments are closed.