Re: [Boost-users] Threading a Shared Model with pointers

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?
5159
Age (days ago)
5159
Last active (days ago)
0 comments
1 participants
participants (1)
-
pcunite@fsmail.net