Merge pull request #1946

a38343bf miner: add a debug log in pause and resume (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-04-11 00:23:43 +02:00
commit 6353e5b0e5
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -377,6 +377,7 @@ namespace cryptonote
void miner::pause() void miner::pause()
{ {
CRITICAL_REGION_LOCAL(m_miners_count_lock); CRITICAL_REGION_LOCAL(m_miners_count_lock);
MDEBUG("miner::pause: " << m_pausers_count << " -> " << (m_pausers_count + 1));
++m_pausers_count; ++m_pausers_count;
if(m_pausers_count == 1 && is_mining()) if(m_pausers_count == 1 && is_mining())
MDEBUG("MINING PAUSED"); MDEBUG("MINING PAUSED");
@ -385,6 +386,7 @@ namespace cryptonote
void miner::resume() void miner::resume()
{ {
CRITICAL_REGION_LOCAL(m_miners_count_lock); CRITICAL_REGION_LOCAL(m_miners_count_lock);
MDEBUG("miner::resume: " << m_pausers_count << " -> " << (m_pausers_count - 1));
--m_pausers_count; --m_pausers_count;
if(m_pausers_count < 0) if(m_pausers_count < 0)
{ {