mardi 28 février 2023

call getting stuck at std::map erase function

I want to understand in which scenario the std::map erase function can gets blocked and not able return from erase.

{
    popHttpRequest(uint64_t requestId)
   {
    boost::unique_lock<boost::shared_mutex> uniqueLock{ m_HttpRequestTableMutex };
    auto itr = m_HttpRequestTable.find(requestId);
    if (itr != m_HttpRequestTable.end())
    {
     auto request = itr->second;
     m_HttpRequestTable.erase(itr);
    }
}

Aucun commentaire:

Enregistrer un commentaire