Hi Johannes, 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. Cheers, David -- David Weese, Ph.D. david.weese@fu-berlin.de Freie Universität Berlin http://www.inf.fu-berlin.de/ Institut für Informatik Phone: +49 30 838 75137 Takustraße 9 Algorithmic Bioinformatics 14195 Berlin Room 020 Am 18.09.2013 um 14:53 schrieb Johannes Dröge <johdro@mpi-inf.mpg.de>: Hi Seqan team, |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature