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

resize() needs to limit the threads that may try to allocate newkvs #6

Closed
rlei opened this issue Mar 22, 2019 · 0 comments
Closed

resize() needs to limit the threads that may try to allocate newkvs #6

rlei opened this issue Mar 22, 2019 · 0 comments
Labels
bug Something isn't working major Major issue
Milestone

Comments

@rlei
Copy link
Owner

rlei commented Mar 22, 2019

There may be multiple threads trying to call resize() and allocate their own new hash table (newkvs) before CAS it to the CHM._newkvs field, and only one will eventually succeed. Others allocation of the new (double sized) hash table will simply be a wasted effort.

The Java NBHM implementation limits the number of the threads that may try to allocate to 2. We should also port this.

@rlei rlei added bug Something isn't working major Major issue labels Mar 22, 2019
@rlei rlei added this to the 0.1.0-alpha milestone Mar 22, 2019
@rlei rlei closed this as completed in a54bdc8 Mar 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major Major issue
Projects
None yet
Development

No branches or pull requests

1 participant