Esempio n. 1
0
 public void Stop()
 {
     // TODO thing about this case, closing opening on switching
     // EthlargementIntegratedPlugin.Instance.Stop(_miningPairs);
     MinerApiWatchdog.RemoveGroup(GroupKey);
     MiningStats.RemoveGroup(MiningPairs.Select(pair => pair.Device.UUID), _plugin.PluginUUID);
     IsRunning = false;
     _miner.StopMining();
     //if (_miner is IDisposable disposableMiner)
     //{
     //    disposableMiner.Dispose();
     //}
 }
Esempio n. 2
0
        private async Task StopAsync()
        {
            // TODO thing about this case, closing opening on switching
            EthlargementIntegratedPlugin.Instance.Stop(_miningPairs);
            MinerApiWatchdog.RemoveGroup(GroupKey);
            MiningDataStats.RemoveGroup(_miningPairs.Select(pair => pair.Device.UUID), _plugin.PluginUUID);
            await _miner.StopMiningTask();

            _algos.ForEach(a => a.IsCurrentlyMining = false);
            //if (_miner is IDisposable disposableMiner)
            //{
            //    disposableMiner.Dispose();
            //}
        }