-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thread safety question on co/instanceCache.cpp #96
Comments
OK. I see that the semantics of release and operator[] guarantee that the data should not be deallocated while in use. Just a minor question then, does stde::hash_map guarantee that the iterators are not invalidated by insertions? |
Good question: I haven't paid attention. Can you look into it? |
The MSVC version doesn't invalidate them:
SGI's documentation on std::hash_map says that resizing doesn't invalidate either:
If gcc agrees with the original STL specification (not the C++ Standard Library), it should be save. |
Thanks. Iirc the gcc STL is the SGI/HP STL. |
Can be closed? |
I think so |
Is it thread safe to return a reference in:
?
I don't see the lock being returned as part of InstanceCache::Data.
The text was updated successfully, but these errors were encountered: