fixed proper shutdown of local CA subscriptions

This commit is contained in:
Jeff Hill
2001-10-03 22:38:53 +00:00
parent 8ca27c4b4e
commit af42d394b9
3 changed files with 10 additions and 2 deletions
+1
View File
@@ -72,6 +72,7 @@ public:
dbSubscriptionIO ( dbServiceIO &, dbChannelIO &, struct dbAddr &, cacStateNotify &,
unsigned type, unsigned long count, unsigned mask, cacChannel::ioid * );
void destroy ();
void channelDestroyException ();
void show ( unsigned level ) const;
void * operator new ( size_t size );
void operator delete ( void *pCadaver, size_t size );
+3
View File
@@ -263,6 +263,9 @@ void dbServiceIO::destroyAllIO ( dbChannelIO & chan )
}
}
while ( ( pIO = tmp.get() ) ) {
// If they call ioCancel() here it will be ignored
// because the IO has been unregistered above
pIO->channelDestroyException ();
pIO->destroy ();
}
if ( chan.dbServicePrivateListOfIO::pBlocker ) {
+6 -2
View File
@@ -57,8 +57,6 @@ dbSubscriptionIO::~dbSubscriptionIO ()
if ( this->es ) {
db_cancel_event ( this->es );
}
this->notify.exception ( ECA_CHANDESTROY,
this->chan.pName(), this->type, this->count );
}
void dbSubscriptionIO::destroy ()
@@ -66,6 +64,12 @@ void dbSubscriptionIO::destroy ()
delete this;
}
void dbSubscriptionIO::channelDestroyException ()
{
this->notify.exception ( ECA_CHANDESTROY,
this->chan.pName(), this->type, this->count );
}
void * dbSubscriptionIO::operator new ( size_t size )
{
epicsAutoMutex locker ( dbSubscriptionIO::freeListMutex );