Hacker News new | past | comments | ask | show | jobs | submit login

Will this work across different goroutines?





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

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


Yes, the package is designed to be thread-safe



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: