From 813a4f526cc4d78188a71c230e27fb4c46809cd3 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 9 May 2002 17:22:36 +0000 Subject: [PATCH] improved ioCancel and shutdown sequence --- src/ca/cac.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index ea71c17d9..b0cd0a230 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -257,11 +257,6 @@ cac::~cac () freeListCleanup ( this->tcpSmallRecvBufFreeList ); freeListCleanup ( this->tcpLargeRecvBufFreeList ); - if ( this->pudpiiu ) { - epicsGuard < callbackMutex > autoMutexCB ( this->cbMutex ); - this->pudpiiu->removeAllChannels ( autoMutexCB ); - } - delete [] this->pUserName; this->beaconTable.traverse ( &bhe::destroy ); @@ -813,10 +808,12 @@ void cac::ioCancel ( nciu &chan, const cacChannel::ioid &id ) } // wait for any IO callbacks in progress to complete // prior to destroying the IO object - epicsGuard < callbackMutex > autoMutex ( this->cbMutex ); + { + epicsGuard < callbackMutex > cbGuard ( this->cbMutex ); + } // now it is safe to destroy the IO object { - epicsGuard < cacMutex > autoMutex ( this->mutex ); + epicsGuard < cacMutex > guard ( this->mutex ); pmiu->destroy ( *this ); } }