public void StartMining(IMiner miner) { StopMining(); MiningCommand = MinerProgramCommand.Run; SelectedMiner = miner; StartMining(); }
public void StopMining() { try { m_keepMining = false; Alarm.Clear(); MiningCommand = MinerProgramCommand.Stop; //clear both queues so that threads wint start running them DownloadingQueue.Clear(); //sometimes if downloaidnf thread is stuck in a long download and we want to stop we might hav to abort thread if (m_Downloading) { m_downloadingThread.Abort(); } MiningQueue.Clear(); RunningMiners.Clear(); if (ActiveMiner != null) { ActiveMiner.StopMining(); ActiveMiner = null; } } catch (Exception e) { } }
public void StartMining(IMiner miner) { StopMining(); MiningCommand = MinerProgramCommand.Run; ActiveMiner = miner; StartMining(); }
public DigibyteMiner() { MiningQueue = new TSQueue <IMinerProgram>(); DownloadingQueue = new TSQueue <IMinerProgram>(); RunningMiners = new TSList <IMinerProgram>(); MiningCommand = MinerProgramCommand.Stop; m_minerThread = new Thread(new ParameterizedThreadStart(MiningThread)); m_downloadingThread = new Thread(new ParameterizedThreadStart(DownLoadingThread)); InitiateThreads(); }