About time to post something about software development.
Today’s post is about a nice read I found from one of http://dotnet.org.za ‘s blogs.
Threads, the thrilling and not-so-much thought about elements of modern development practices.
What is the magic number for a simple application, Threads at the right places doing the right things, are you using lock() to lock appropriate object at the right times.
Here is a nice post on Coding Sanity, an South Africa .net blog, discussing Threads Do’s and Don’ts .
work recently I was asked to write a little document on some threading tips, and while I was about it, I noticed this thread on StackOverflow asking for the same thing. I don’t pretend that this is comprehensive or even necessarily 100% correct. However, it’s a start to try and apply some simple guidelines to threading. Any improvements, suggestions, additions, please let me know and I’ll make the necessary changes. Since I see this as a “living” page I won’t clutter it with edit marks as it changes. Look in the comments for change history.
DO reconsider your optionsConcurrency is very tricky and difficult to get right. It often leads to subtle and difficult to debug programming errors, and far too commonly does not result in significant speed improvements. Make absolutely certain that there are not other alternatives.
DO Use lock() { … } ….