CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::LimitedTaskQueue::Resumer Class Reference

#include <LimitedTaskQueue.h>

Public Member Functions

Resumeroperator= (Resumer const &iOther)
 
Resumeroperator= (Resumer &&iOther)
 
bool resume ()
 
 Resumer ()=default
 
 Resumer (Resumer &&iOther)
 
 Resumer (Resumer const &iOther)
 
 ~Resumer ()
 

Private Member Functions

 Resumer (SerialTaskQueue *iQueue)
 

Private Attributes

SerialTaskQueuem_queue = nullptr
 

Friends

class LimitedTaskQueue
 

Detailed Description

Definition at line 65 of file LimitedTaskQueue.h.

Constructor & Destructor Documentation

edm::LimitedTaskQueue::Resumer::Resumer ( )
default
edm::LimitedTaskQueue::Resumer::~Resumer ( )
inline

Definition at line 70 of file LimitedTaskQueue.h.

References resume().

edm::LimitedTaskQueue::Resumer::Resumer ( Resumer &&  iOther)
inline

Definition at line 72 of file LimitedTaskQueue.h.

72 : m_queue(iOther.m_queue) { iOther.m_queue = nullptr; }
edm::LimitedTaskQueue::Resumer::Resumer ( Resumer const &  iOther)
inline

Definition at line 74 of file LimitedTaskQueue.h.

References m_queue, and edm::SerialTaskQueue::pause().

74  : m_queue(iOther.m_queue) {
75  if (m_queue) {
76  m_queue->pause();
77  }
78  }
bool pause()
Pauses processing of additional tasks from the queue.
edm::LimitedTaskQueue::Resumer::Resumer ( SerialTaskQueue iQueue)
inlineprivate

Definition at line 103 of file LimitedTaskQueue.h.

103 : m_queue{iQueue} {}

Member Function Documentation

Resumer& edm::LimitedTaskQueue::Resumer::operator= ( Resumer const &  iOther)
inline

Definition at line 80 of file LimitedTaskQueue.h.

References eostools::move(), and protons_cff::t.

Referenced by edm::LimitedTaskQueue::concurrencyLimit().

80  {
81  auto t = iOther;
82  return (*this = std::move(t));
83  }
def move(src, dest)
Definition: eostools.py:511
Resumer& edm::LimitedTaskQueue::Resumer::operator= ( Resumer &&  iOther)
inline

Definition at line 84 of file LimitedTaskQueue.h.

References m_queue, and edm::SerialTaskQueue::resume().

84  {
85  if (m_queue) {
86  m_queue->resume();
87  }
88  m_queue = iOther.m_queue;
89  iOther.m_queue = nullptr;
90  return *this;
91  }
bool resume()
Resumes processing if the queue was paused.
bool edm::LimitedTaskQueue::Resumer::resume ( )
inline

Definition at line 93 of file LimitedTaskQueue.h.

References m_queue, and lumiQueryAPI::q.

Referenced by edm::LuminosityBlockProcessingStatus::resumeGlobalLumiQueue(), and ~Resumer().

93  {
94  if (m_queue) {
95  auto q = m_queue;
96  m_queue = nullptr;
97  return q->resume();
98  }
99  return false;
100  }

Friends And Related Function Documentation

friend class LimitedTaskQueue
friend

Definition at line 67 of file LimitedTaskQueue.h.

Referenced by edm::LimitedTaskQueue::concurrencyLimit().

Member Data Documentation

SerialTaskQueue* edm::LimitedTaskQueue::Resumer::m_queue = nullptr
private

Definition at line 104 of file LimitedTaskQueue.h.

Referenced by operator=(), resume(), and Resumer().