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 sync map and sync set #425

Closed
wants to merge 1 commit into from
Closed

Add sync map and sync set #425

wants to merge 1 commit into from

Conversation

plorenz
Copy link
Member

@plorenz plorenz commented Jan 3, 2025

No description provided.

@plorenz plorenz requested a review from a team as a code owner January 3, 2025 00:34
@andrewpmartinez
Copy link
Member

Is there a reason ConcurrentMap and ConcurrentSet don't cover this case? I know ConccurrentMap uses shards with locks instead of 1 lock. I haven't looked at its set implementation.

@plorenz
Copy link
Member Author

plorenz commented Jan 6, 2025

Is there a reason ConcurrentMap and ConcurrentSet don't cover this case? I know ConccurrentMap uses shards with locks instead of 1 lock. I haven't looked at its set implementation.

Could use ConcurrentMap (there is no ConcurrentSet impl). This use case is single writer, multiple reader with reads being much higher frequency than writes. cmap will use more memory, but probably not a lot more. This is a bit tidier, but cmap has some perf potential, so I'll switch.

@plorenz plorenz closed this Jan 6, 2025
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.

2 participants