Proof of Concept : Concurrent exacthash #56
Replies: 3 comments
-
The shared object For example, if doc_a and doc_b are the same, and hash_dict does not contain this specific fingerprint before this batch, they could end up updating It might need a lock when accessing |
Beta Was this translation helpful? Give feedback.
-
I assumed that the I think they might not. If the do provide locking methods, they are not documented. Considering how python is with concurrency this is non trivial.
I implemented this when I stumbled upon how np.ndarray can be initialized from a shared_memory buffer, but it does not seem to be the magic bullet I was looking for, if it exists at all. |
Beta Was this translation helpful? Give feedback.
-
I think the SyncManager object itself is thread-safe. But the if-else code is not (both entering the else branch but still updating the |
Beta Was this translation helpful? Give feedback.
-
I built a proof of concept concurrent exact hash using
shared_memory
andManager()
from multiprocessingDiscussion
Beta Was this translation helpful? Give feedback.
All reactions