Skip to content

Commit

Permalink
pvac::Monitor::cancel() don't clear data members
Browse files Browse the repository at this point in the history
Clearing root, overrun, and changed makes it difficult
to avoid a race during an async. cancel (very common).
  • Loading branch information
mdavidsaver committed Sep 12, 2019
1 parent 710bcde commit 24e83da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/client/clientMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ std::string Monitor::name() const

void Monitor::cancel()
{
changed.clear();
overrun.clear();
root.reset();
if(impl) impl->cancel();
}

Expand Down
6 changes: 5 additions & 1 deletion src/client/pva/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit 24e83da

Please sign in to comment.