queue.take possible race, send thread does not wait for read anymore

This commit is contained in:
Matej Sekoranja
2015-01-07 12:58:28 +01:00
parent ffeab62d7f
commit 228d7fe279
3 changed files with 17 additions and 4 deletions

View File

@@ -4515,6 +4515,15 @@ TODO
// stop UDPs
m_searchTransport->close();
m_broadcastTransport->close();
// wait for all transports to cleanly exit
int tries = 40;
epics::pvData::int32 transportCount;
while ((transportCount = m_transportRegistry->numberOfActiveTransports()) && tries--)
epicsThreadSleep(0.025);
if (transportCount)
LOG(logLevelDebug, "PVA client context destroyed with %d transport(s) active.", transportCount);
}
void destroyAllChannels() {