go-radix
go-radix copied to clipboard
concurrency
Can this be used from multiple concurrent goroutines?
I think you can think of this like a Go map. If you create the trie first in one goroutine, then you can use any number of goroutines for reading the trie later on. But if you want to keep modifying the trie, you need to add your own mutex wrappers around the accesses.
Thanks @FrankReh that is correct. The data structure does no internally locking, so you would need to wrap it if you needed thread safety.