mux in Prefix only works for memory storage
Closed this issue · 1 comments
ulrichSchreiner commented
the Prefix
struct contains a mutex named mux
which is used for locking. This will only work when using the memory storage as you are using a central map with pointers to prefixes.
when using the database storage, every call to PrefixFrom
returns a new prefix so every prefix will contain a new mutex. The locking will not work here.
I'd propose to completely remove this locking. if you really want to lock, it must be an implemenation detail of the concrete storage mechanism.
ulrichSchreiner commented
pr #14 works on this