what's the (realistic) worst case scenario that could happen if I read (iterate over equal_range) from a std::multimap in one thread while writing (inserting a new element) in another?
I have an application which will only very rarely write (few dozen times in the first seconds, maybe once every few minutes thereafter), but often read (every couple milliseconds), and I really don't want to have to check a mutex every millisecond for those rare writes.
My understanding of red-black trees (which I believe std::multimaps are) would lead me to believe that nothing horrible could happen, but then again my understanding of red-black trees is nowhere near perfect...
Any other ideas for avoiding a mutex? Or should I just mutex it and get it over with?