summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-10-08 07:40:01 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-10-08 07:40:01 (GMT)
commit2c6f1075474f6b8086cc6abf7978aee9421761c8 (patch)
tree33dede68126fa3f9355406de7067d63499bd7775 /Swiften/Queries/IQRouter.cpp
parent3fafb8bb9387d859bc187c23db6efac90c8683d4 (diff)
downloadswift-2c6f1075474f6b8086cc6abf7978aee9421761c8.zip
swift-2c6f1075474f6b8086cc6abf7978aee9421761c8.tar.bz2
Protect JID cache access with mutex.
The overhead appears to be neglectible. Using TSS had a similar overhead, with the disadvantages that it uses more storage (one cache per thread vs one cache), has less cache reuse, and that Windows/MSVC doesn't support automatic TSS cleanup, so it requires manual cleanup work (which is non-trivial). Note that the mutex approach may yield more overhead in multi-threaded applications (in case of contention). Currently, the mutex also locks during the whole nameprep sequence, which is not strictly necessary.
Diffstat (limited to 'Swiften/Queries/IQRouter.cpp')
0 files changed, 0 insertions, 0 deletions