
AMDG Robert Ramey wrote:
What could this mean?
That multiple threads read/write to the same open archive? Of course this could never make sense.
In the given code, a new ifstream and archive are created for reading.
That multiple archives are being used simultaneously by different threads? As far as I know, subject to the following, there should be no problem.
a) If serialization code for some class is in a DLL and this DLL is dynamically loaded/unloaded while some other archive is open and being used by a separate thread, there could be a problem. This would be due to the fact that there is global list of types which is updated when a DLL is loaded and/or unloaded.
It's blowing up when trying to read the serialization header. I don't think this has anything to do with the type being serialized.
b) xml_iarchives depend upon spirit which is not guarenteed thread-safe. I looked at the spirit code and believe that I selected that part which was thread-safe. But at least one user noted an issue with loading multiple xml_iarchives from separate threads.
It's a binary archive. In Christ, Steven Watanabe