Posts Tagged: troubleshooting

Critical Blocks and Improper Lock Objects

Quick catch-up… critical application blocks are blocks of code that can only be executed by one thread at a time. Stock example for illustration: public static class SmackTracker { private static int smackCount = 0; private static object locker = new object();   public static void HitItAgain() { lock (locker) { smackCount++; } } }… Read more »