I don't think this is safe - the rows could be released while you are rehashing causing you to access invalid pointers.

I'm not sure a spin block is really correct - I suspect a criticalsection is more appropriate.