Open rsanchezgarc opened 6 years ago
Sqlite3 does not support threads. So, all operations on a Set (or anything using a mapper) should be done in the main thread. This imply that you can not iterate over the input sets in the steps of protocols that run in parallel.
is there a workaround? like copying the sqlite...
I have checked that, when run with multiple threads, this line, included in Consensus particle picker protocol (when STEPS_PARALLEL is set) is causing problems due to sqlite cursor recurrence.
228: coordArray = np.asarray([x.getPosition() for x in coordinates.get().iterCoordinates( micrograph.getObjId())], dtype=float)
My guess about how to fix it is that the mapper object should have a different cursor for each query.