Libspatialindex is not threadsafe, so all operations (even queries as I understand) need to be done under a lock.
The way you would do this is by adding a lock field to the struct, providing it a ReentrantLock on construction, and then calling the C-API only under a
lock(index.lock)
try
# call CAPI here
finally
unlock(index.lock)
end
Libspatialindex is not threadsafe, so all operations (even queries as I understand) need to be done under a lock.
The way you would do this is by adding a
lockfield to the struct, providing it aReentrantLockon construction, and then calling the C-API only under a