Skip to content

Commit

Permalink
Merge pull request #21684 from Dr15Jones/fixTaskQueues
Browse files Browse the repository at this point in the history
Simple fixes for task queues
  • Loading branch information
cmsbuild committed Dec 12, 2017
2 parents ef598b6 + 92065f6 commit 0a49f60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion FWCore/Concurrency/interface/LimitedTaskQueue.h
Expand Up @@ -98,7 +98,9 @@ namespace edm {

bool resume() {
if(m_queue) {
return m_queue->resume();
auto q = m_queue;
m_queue = nullptr;
return q->resume();
}
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Concurrency/interface/SerialTaskQueue.h
Expand Up @@ -77,7 +77,7 @@ namespace edm {
/**\return true if the queue is paused
* \sa pause(), resume()
*/
bool isPaused() const { return m_pauseCount.load()==0;}
bool isPaused() const { return m_pauseCount.load()!=0;}

// ---------- member functions ---------------------------
/// Pauses processing of additional tasks from the queue.
Expand Down

0 comments on commit 0a49f60

Please sign in to comment.