Currently, in my program I find that sometimes std::map::find() crashes. I also put a break point and checked it but the value is present in the map and even then it crashes. I wanted to know is there any other way other than applying lock before executing find?... Here, the function where I am using find() is being accessed very frequently hence i need something apart from lock so that I can look up into the map and if the element is present I get an iterator to it.
Any ideas on how can this be achieved?...
Aucun commentaire:
Enregistrer un commentaire