From 24e83daaba1c7b3618b355b4f4dc37ab79414a74 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Wed, 11 Sep 2019 18:03:39 -0700 Subject: [PATCH] pvac::Monitor::cancel() don't clear data members Clearing root, overrun, and changed makes it difficult to avoid a race during an async. cancel (very common). --- src/client/clientMonitor.cpp | 3 --- src/client/pva/client.h | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/client/clientMonitor.cpp b/src/client/clientMonitor.cpp index 55f6b9c..90113e4 100644 --- a/src/client/clientMonitor.cpp +++ b/src/client/clientMonitor.cpp @@ -196,9 +196,6 @@ std::string Monitor::name() const void Monitor::cancel() { - changed.clear(); - overrun.clear(); - root.reset(); if(impl) impl->cancel(); } diff --git a/src/client/pva/client.h b/src/client/pva/client.h index 9578fb4..446ca11 100644 --- a/src/client/pva/client.h +++ b/src/client/pva/client.h @@ -124,7 +124,11 @@ struct epicsShareClass Monitor //! Channel name std::string name() const; //! Immediate cancellation. - //! Does not wait for remote confirmation. + /** Does not wait for remote confirmation. + * + @since Up to 7.0.0 also cleared root, changed, and overrun. + After 7.0.0, these data members are left unchanged. + **/ void cancel(); /** updates root, changed, overrun *