
5 Mar
2011
5 Mar
'11
4:20 p.m.
I explained this wrong. What is really happening is that each thread has a pointer to the object (forget about the vector for the moment) and it uses this as a key many hours later. When it is given serialized access to the "model/database cache", the thread wants to do work using that key, of course now it is no longer valid. This is why using map works, but I did not want to search every time, that is why weak_ptr works. Just wanted to know the best approach for this type of problem. All access to everything is thread safe. Any thoughts now?