diff options
Diffstat (limited to 'cpp/src/qpid/sys/Timer.h')
| -rw-r--r-- | cpp/src/qpid/sys/Timer.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/sys/Timer.h b/cpp/src/qpid/sys/Timer.h index fccb17dbc2..af0b1b6803 100644 --- a/cpp/src/qpid/sys/Timer.h +++ b/cpp/src/qpid/sys/Timer.h @@ -40,6 +40,7 @@ class Timer; class TimerTask : public RefCounted { friend class Timer; + friend class TimerTaskCallbackScope; friend bool operator<(const boost::intrusive_ptr<TimerTask>&, const boost::intrusive_ptr<TimerTask>&); @@ -47,9 +48,11 @@ class TimerTask : public RefCounted { AbsTime sortTime; Duration period; AbsTime nextFireTime; - Mutex callbackLock; - volatile bool cancelled; + qpid::sys::Monitor stateMonitor; + enum {WAITING, CALLBACK, CANCELLED} state; + bool prepareToFire(); + void finishFiring(); bool readyToFire() const; void fireTask(); |
