qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1358265 - in /qpid/trunk/qpid/cpp/src/qpid/sys: Timer.cpp Timer.h
Date Fri, 06 Jul 2012 15:29:48 GMT
Author: astitcher
Date: Fri Jul  6 15:29:47 2012
New Revision: 1358265

URL: http://svn.apache.org/viewvc?rev=1358265&view=rev
Log:
NO-JIRA: Fix previous TimerTask fix to workaround stupid windows.h symbol corruption

Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/Timer.h

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp?rev=1358265&r1=1358264&r2=1358265&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp Fri Jul  6 15:29:47 2012
@@ -55,7 +55,7 @@ bool TimerTask::readyToFire() const {
 bool TimerTask::prepareToFire() {
     Monitor::ScopedLock l(stateMonitor);
     if (state != CANCELLED) {
-        state = CALLBACK;
+        state = CALLING;
         return true;
     } else {
         return false;
@@ -90,7 +90,7 @@ void TimerTask::restart() {
 
 void TimerTask::cancel() {
     Monitor::ScopedLock l(stateMonitor);
-    while (state == CALLBACK) {
+    while (state == CALLING) {
         stateMonitor.wait();
     }
     state = CANCELLED;

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/Timer.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/Timer.h?rev=1358265&r1=1358264&r2=1358265&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/Timer.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/Timer.h Fri Jul  6 15:29:47 2012
@@ -49,7 +49,7 @@ class TimerTask : public RefCounted {
     Duration period;
     AbsTime nextFireTime;
     qpid::sys::Monitor stateMonitor;
-    enum {WAITING, CALLBACK, CANCELLED} state;
+    enum {WAITING, CALLING, CANCELLED} state;
 
     bool prepareToFire();
     void finishFiring();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message