Skip to content
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

unordered_map_concurrent: fix missing size decrement upon erase #2624

Merged
merged 1 commit into from
Jul 4, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Jul 2, 2020

Closes #2623

Signed-off-by: Larry Gritz lg@larrygritz.com

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@fpsunflower
Copy link
Contributor

Did you benchmark this? Any reason to think this might influence the texture system?

@ElaraFX
Copy link

ElaraFX commented Jul 2, 2020

Did you benchmark this? Any reason to think this might influence the texture system?

I reviewed the places in OIIO which use this class, it does not affect the correctness of OIIO's texture system itself. However, we re-used OIIO's infrastructure to build some other cache system, which requires this class to be correctly implemented.

@lgritz
Copy link
Collaborator Author

lgritz commented Jul 2, 2020

It only fixes the fact that as we called erase(), it was not decrementing the overall count of entries in the map (which we were incrementing when we add entries). In our code base, there are no consequences, which is why we never noticed the bug.

@fpsunflower
Copy link
Contributor

LGTM then!

@lgritz lgritz merged commit 2ebf56f into AcademySoftwareFoundation:master Jul 4, 2020
@lgritz lgritz deleted the lg-umc branch July 4, 2020 21:10
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] unordered_map_concurrent does not decrement size in erase
3 participants