changed interface so that callback is immediate if there is no space in the queue

This commit is contained in:
Jeff Hill
2002-06-27 23:54:01 +00:00
parent f124a5b941
commit 5aef71fe05
2 changed files with 11 additions and 10 deletions

View File

@@ -82,6 +82,7 @@ void ipAddrToAsciiEngine::run ()
{
epicsGuard < epicsMutex > locker ( ipAddrToAsciiEngine::mutex );
if ( this->pCurrent ) {
this->pCurrent->pEngine = 0;
this->callbackInProgress = true;
}
else {
@@ -94,10 +95,7 @@ void ipAddrToAsciiEngine::run ()
{
epicsGuard < epicsMutex > locker ( ipAddrToAsciiEngine::mutex );
if ( this->pCurrent ) {
this->pCurrent->pEngine = 0;
this->pCurrent = 0;
}
this->pCurrent = 0;
this->callbackInProgress = false;
}
if ( this->cancelPending ) {
@@ -173,7 +171,7 @@ ipAddrToAsciiAsynchronous::~ipAddrToAsciiAsynchronous ()
}
}
epicsShareFunc bool ipAddrToAsciiAsynchronous::ioInitiate ( ipAddrToAsciiEngine & engine )
epicsShareFunc void ipAddrToAsciiAsynchronous::ioInitiate ( ipAddrToAsciiEngine & engine )
{
bool success;
@@ -193,8 +191,12 @@ epicsShareFunc bool ipAddrToAsciiAsynchronous::ioInitiate ( ipAddrToAsciiEngine
if ( success ) {
engine.laborEvent.signal ();
}
return success;
else {
char autoNameTmp[256];
sockAddrToA ( &this->addr.sa, autoNameTmp,
sizeof ( autoNameTmp ) );
this->ioCompletionNotify ( autoNameTmp );
}
}
void ipAddrToAsciiAsynchronous::show ( unsigned level ) const