there is a mutable private string inside the NameCache that is not thread-safe. So although getIdByName is used with a constant name store cache, there will be some concurrent write accesses if you use it with multiple threads. Internally a name store cache is a set of ids (unsigned ints) that are sorted lexicographically with respect to the corresponding names in the name store (a StringSet).
The std::set::find() only supports to search for keys of the set, i.e. ids. That means if a random string needs to be looked up we first store it temporarily in a private mutable string inside the less operator and search for the id -1 to signal the less operator that this string should be compared with the strings inside the name store. If the std::set would be more generic in the types that find and the less operator would accept we wouldn't need to do it this way.
So right now, you should put your lookups inside an critical section until we found a better solution.
Am 18.09.2013 um 14:53 schrieb Johannes Dröge <email@example.com>:
Hi Seqan team,
Description: S/MIME cryptographic signature