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

what shuld used for AtomicCell or ShardedLock #990

Closed
jixiang-yz opened this issue Jun 15, 2023 · 1 comment
Closed

what shuld used for AtomicCell or ShardedLock #990

jixiang-yz opened this issue Jun 15, 2023 · 1 comment

Comments

@jixiang-yz
Copy link

I have a data structure HashMap<String, ArrayQueue<Message>>,that is more than 90% read and only rarely write. Which structure should I use to protect it? AtomicCell or ShardedLock

@taiki-e
Copy link
Member

taiki-e commented Jun 15, 2023

ShardedLock. (AtomicCell is mainly for Copy-able types.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants