Boost logo

Boost Users :

Subject: Re: [Boost-users] Threading a Shared Model with pointers
From: pcunite_at_[hidden]
Date: 2011-03-05 11:20:27


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?
 


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net