upgraded event subscription logic

This commit is contained in:
Jeff Hill
2001-01-23 23:56:05 +00:00
parent debb5b5814
commit db43b6e983
14 changed files with 189 additions and 151 deletions
+9 -23
View File
@@ -21,6 +21,7 @@
#include "nciu_IL.h"
#include "ioCounter_IL.h"
#include "comQueSend_IL.h"
#include "recvProcessThread_IL.h"
extern "C" void cacRecursionLockExitHandler ()
{
@@ -157,9 +158,9 @@ cac::~cac ()
// make certain that process thread isnt deleting
// tcpiiu objects at the same that this thread is
//
recvProcessThread *pTmp = this->pRecvProcThread;
this->pRecvProcThread = 0;
delete pTmp;
if ( this->pRecvProcThread ) {
this->pRecvProcThread->disable ();
}
if ( this->pudpiiu ) {
// this blocks until the UDP thread exits so that
@@ -193,6 +194,10 @@ cac::~cac ()
}
}
if ( this->pRecvProcThread ) {
delete this->pRecvProcThread;
}
if ( this->pRepeaterSubscribeTmr ) {
delete this->pRepeaterSubscribeTmr;
}
@@ -1031,23 +1036,4 @@ void cac::destroyNCIU ( nciu & chan )
chan.cacDestroy ();
}
// the recv thread is not permitted to flush as this
// can result in a push / pull deadlock on the TCP pipe.
// Instead, the recv thread scheduals the flush with the
// send thread which runs at a higher priority than the
// send thread. The same applies to the UDP thread for
// locking hierarchy reasons.
bool cac::flushPermit () const
{
if ( this->pRecvProcThread ) {
if ( this->pRecvProcThread->thread.isCurrentThread () ) {
return false;
}
}
if ( this->pudpiiu ) {
if ( this->pudpiiu->isCurrentThread () ) {
return false;
}
}
return true;
}