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

Thread Safety #566

Open
tenderworks opened this issue Nov 21, 2024 · 0 comments
Open

Thread Safety #566

tenderworks opened this issue Nov 21, 2024 · 0 comments

Comments

@tenderworks
Copy link

Hi,

I've noticed Semian has a few globals that aren't thread safe, or at least they're shared among threads. For example this consumers instance variable, the LRU cache, and this subscribers instance variable are all globals. I don't think they should be shared among threads, and if they are, I think they should be using a concurrent hash map.

I don't know all of the possible usages for this library, so I'm not sure the best way to fix it, but I don't think it's correct as it stands.

Thanks!

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

1 participant