コード例 #1
0
        private void ProcessDatabaseThread(object sender, DoWorkEventArgs e)
        {
            while (!e.Cancel)
            {
                _dbThread.Run();
            }

            Console.WriteLine("Database thread shut down successfully!");
        }
コード例 #2
0
        private void ProcessDatabaseThread()
        {
            Console.WriteLine("DB thread starting");
            while (!_isShuttingDown)
            {
                _dbThread.Run();
            }

            _threadHasShutDown = true;
        }