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

Add multithreading-access tests #16

Open
chuwy opened this issue Feb 4, 2019 · 2 comments
Open

Add multithreading-access tests #16

chuwy opened this issue Feb 4, 2019 · 2 comments

Comments

@chuwy
Copy link
Contributor

chuwy commented Feb 4, 2019

Not yet sure what the test would be, but implementation doesn't look thread-safe right now.

@chuwy
Copy link
Contributor Author

chuwy commented Feb 4, 2019

...or does it even matter since we don't have non-atomic operations, e.g. get-or-set?

@voropaevp
Copy link

voropaevp commented Nov 12, 2022

This is most definitely not-thread-safe. An example in Readme is particularly prone to racing. As get and set could be called at different times, with the content of the map drifting.

Look at the MapRef from CE3 std and Chris Davenport's LruMap.

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

No branches or pull requests

2 participants