template<typename Key, typename Value> std::optional<Value> InterServerChannel<Key, Value>::DetachMessage(Key key) { typename channel_type::accessor acr; if (internal_channel_.find(acr, key)) { Value temp = acr->second; acr.release(); // ?? 없으면 데드락 나부리는 것 같은데 internal_channel_.erase(key); return temp; } return {}; }


acr.release 없을 때 erase(key) 실행하면 스레드 블락된 것 마냥 디버깅 모드에서 현재 실행 커서 사라지길래


acr.release() 넣어서 find로 획득했던 락 푸니까 정상적으로 되돌아갔거든


근데 이게 락 없이 erase 하는 거면은 자료구조 터지는 거아닌가? 쉽헐;;


tbb concurrent hash map에서 find 하고 그 담에 erase 어케 해야하누;;


release 해준 다음에 accessor 또 불러서 erase 해야함? ㄷㄷ


구글링해도 뭐 나오는 자료가 없네 레퍼런스 봐도 안 보임 내가 못 찾는 건가