Hi Peter,
Thanks for the information.
Our model is multi-threaded, so we are now taking a closer look at the way
in which we are using shared_ptr, and checking if any of them are used
across threads.
Regards
Dave
Please respond to boost-users@lists.boost.org
Sent by: boost-users-bounces@lists.boost.org
To:
It appears that there are a lot of restrictions on how shared_ptrs can be used in a multithreaded program, and I may be breaking some of those restrictions as it is easy to do so.
There is one restriction: all write accesses to a specific shared_ptr need to be exclusive. This is the usual Posix model, also called "as thread safe as an int" and "basic thread safety". It applies to most shared variables in a program. But I agree that it is easy to break the rules. And there is always the possibility that your program is fine, but there might be a thread-related error in shared_ptr (these are very difficult to find). So please let me know if you find out more. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users ------------------------------------------------------------ This email and any attached files contains company confidential information which may be legally privileged. It is intended only for the person(s) or entity to which it is addressed and solely for the purposes set forth therein. If you are not the intended recipient or have received this email in error please notify the sender by return, delete it from your system and destroy any local copies. It is strictly forbidden to use the information in this email including any attachment or part thereof including copying, disclosing, distributing, amending or using for any other purpose. In addition the sender excludes all liabilities (whether tortious or common law) for damage or breach arising or related to this email including but not limited to viruses and libel.