Closed Robert-M-Muench closed 3 years ago
rbang is not threadsafe. You will need to use Mutex.
I typically use a RWMutex and wrap Lock/Unlock around Insert/Delete operations and RLock/RUnlock around the others.
I have no immediate plans to make it threadsafe.
Ok, thanks.
I tried to use https://github.com/Workiva/go-datastructures/tree/master/rtree, but it seems buggy when you are changing some members' coordinates; deleting and inserting doesn't seem to work correctly.
However, it claims that the RTree can be used threadsafe. From looking at the source, I think rbang is not threadsafe. Is that correct? Any plans to make it threadsafe?