You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if this library supports concurrency, and saw that a recent commit seems to imply that the support has been added: 1ce4922
However, wouldn't your trie still be open to concurrent read operations while you have mutex locked Add or Remove. In that case, would it make sense to shift to sync.RWMutex.
Also to support custom concurrent walks, it would make sense to have GetChild(rune) *Node function instead of Children() map[rune]*Node. So that a read lock can be taken inside GetChild. Whereas, using Children() would allow the caller to easily ignore an internal mutex lock.
The text was updated successfully, but these errors were encountered:
I was wondering if this library supports concurrency, and saw that a recent commit seems to imply that the support has been added: 1ce4922
However, wouldn't your trie still be open to concurrent read operations while you have mutex locked
Add
orRemove
. In that case, would it make sense to shift tosync.RWMutex
.Also to support custom concurrent walks, it would make sense to have
GetChild(rune) *Node
function instead ofChildren() map[rune]*Node
. So that a read lock can be taken insideGetChild
. Whereas, usingChildren()
would allow the caller to easily ignore an internal mutex lock.The text was updated successfully, but these errors were encountered: