Geeks With Blogs
Chris Breisch   .NET Data Practices
Search this Blog!

As a follow-up on my post yesterday about threading, here's a good post on how to choose among the wide variety of choices to create a thread-safe GUI.  After reading both of these, I've decided that I need to re-work the threading on an app I recently wrote.  Live and learn.

From the intro:

With .NET 2.0 and with the new "anonymous delegates" feature in C#, doing multi threaded responsive GUIs is now easier. In fact, you get multiple choices on how to accomplish this task. But which choice is the best? and what does "best" really mean? more elegant? faster? more readable? all of the above?

Here's a little scenario for you. Assume there is a method that displays a string on the GUI, but may be called by a different thread than the GUI. The method has only a single string parameter. here are three versions of how you can implement this method and keep it thread safe. The last one is my favorite.

Posted on Wednesday, September 6, 2006 6:05 AM .NET Development , Architecture | Back to top


Comments on this post: Thread-safe GUI's

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Chris J. Breisch | Powered by: GeeksWithBlogs.net