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

Does Murmur32 instance is thread safe? #11

Open
lucasoares opened this issue Mar 22, 2023 · 1 comment
Open

Does Murmur32 instance is thread safe? #11

lucasoares opened this issue Mar 22, 2023 · 1 comment

Comments

@lucasoares
Copy link

Hello.

I just saw the usage of this library in Seq's tutorial: https://blog.datalust.co/serilog-tutorial/ (check for Event type enrichment).

When I created the enrichment listed there I notice the Murmur32 class is a IDisposable and Seq's example does't dispose it.

Should I create this instance every time I need to hash something and then dispose it or I should have a global static instance?

Thanks.

@Zetanova
Copy link

Near all .net HashAlgorithm are not thread-safe.
best create one instance for each execution or loop

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