diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-06-23 20:02:35 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-06-23 20:02:35 +0000 |
| commit | 043622065972dee6a008fa20cc70d0fb73e666d4 (patch) | |
| tree | 95c994fb4f95382abfb0b3640f7cd2e962c93068 /cpp/src/qpid/sys/Timer.h | |
| parent | 92231d488633e10efddb84b8423fc368f21516e0 (diff) | |
| download | qpid-python-043622065972dee6a008fa20cc70d0fb73e666d4.tar.gz | |
Add blocking to sys::Timer so that timer callback and cancel
can't happen interleaved
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@787813 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/Timer.h')
| -rw-r--r-- | cpp/src/qpid/sys/Timer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/Timer.h b/cpp/src/qpid/sys/Timer.h index dab2f55edb..b5bf5d8a4c 100644 --- a/cpp/src/qpid/sys/Timer.h +++ b/cpp/src/qpid/sys/Timer.h @@ -22,6 +22,7 @@ #define sys_Timer #include "qpid/sys/Monitor.h" +#include "qpid/sys/Mutex.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/RefCounted.h" @@ -43,6 +44,7 @@ class TimerTask : public RefCounted { Duration period; AbsTime nextFireTime; + Mutex callbackLock; volatile bool cancelled; bool readyToFire() const; |
