Static Methods and Locking

6. February 2008 05:42

Recently, I was reviewing some code for a new application and noticed several static methods that were locking to safeguard against concurrently executing threads.  However, the majority of these static methods did not involve any static data.  So, it seemed like a good op