top | item 41592733

(no title)

saylisteins | 1 year ago

Will this work across different goroutines?

discuss

order

val_deleplace|1 year ago

I tested with many concurrent goroutines, and confirmed that calling `unique.Make` does not cause any data race condition

saylisteins|1 year ago

Thanks a lot! I also found this blog post where they mention it's thread safe thanks to using HashTrieMap internally

Link: https://go.dev/blog/unique

val_deleplace|1 year ago

Yes, the package is designed to be thread-safe