HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by saylisteins | Hacker News Reader
Full thread
saylisteins
·
Will this work across different goroutines?
View on HN
val_deleplace
·
I tested with many concurrent goroutines, and confirmed that calling `unique.Make` does not cause any data race condition
saylisteins
·
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
·
We agreed to make the threadsafeness more explicit in the documentation of the 'unique' package:
https://github.com/golang/go/issues/69637
val_deleplace
·
Yes, the package is designed to be thread-safe
Reply on news.ycombinator.com