コード例 #1
0
        public static void DoHardWorkThreadSafety()
        {
            ThreadSafeLoggerSingleton logger    = ThreadSafeLoggerSingleton.GetInstance();
            HardProcessor             processor = new HardProcessor(1);

            logger.Log("Thread safe hard work started...");
            processor.ProcessTo(5);
            logger.Log("Thread safe hard work finished...");
        }
コード例 #2
0
        public static void DoHardWork()
        {
            LoggerSingleton logger    = LoggerSingleton.GetInstance();
            HardProcessor   processor = new HardProcessor(1);

            logger.Log("Hard work started...");
            processor.ProcessTo(5);
            logger.Log("Hard work finished...");
        }