Deadlock on insert
Hi, I was trying to use CHashMap for my genetic algorithm project, and I found out that insert deadlocks my code. You can find the full code here. (I'm planning to release under open-source license however in a more acceptable state.) One may simply run the code with cargo run --release. As you may see the code blocks at a "try to insert" print out after a while, never reaching the "insert done". Those print out are in "concurentMap_divider.rs".
I am doing multiple insertions at the same time. I suspect that the scanning and the inserting process is int conflict because:
- if I use insert_new the code never blocks
- after a short debug I think that at least one of the threads blocks at lines
if ret.is_none() { self.expand(lock);}
If someone gives me some hints I can try to resolve myself, however, I feel a little bit lost. (And I have no idea how to debug further.)
Best regards, Örs