murmurhash-net icon indicating copy to clipboard operation
murmurhash-net copied to clipboard

Does Murmur32 instance is thread safe?

Open lucasoares opened this issue 2 years ago • 1 comments

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.

lucasoares avatar Mar 22 '23 13:03 lucasoares

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

Zetanova avatar Mar 23 '23 19:03 Zetanova