{
std::unique_lock aDestructionGuard(m_aDestructionSafety); // this is just for the case we're deleted while another thread just handled the event : // if this other thread called our link while we were deleting the event here, the // link handler blocked. With leaving the above block it continued, but now we are prevented // to leave this destructor 'til the link handler recognizes that nEvent == 0 and leaves.
}
}
IMPL_LINK(OAsynchronousLink, OnAsyncCall, void*, _pArg, void)
{
{
std::unique_lock aDestructionGuard(m_aDestructionSafety);
{
std::unique_lock aEventGuard(m_aEventSafety); if (!m_nEventId) // our destructor deleted the event just while we are waiting for m_aEventSafety // -> get outta here return;
m_nEventId = nullptr;
}
}
m_aHandler.Call(_pArg);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.