Re: Empty option for testing archives
Johnathan Burchill <[email protected]> Sat, 26 May 2007 09:21:59 -0400
| Newsgroups | gmane.comp.sysutils.backup.dar.libdar |
|---|---|
| Message-ID | <[email protected]> |
Hi Denis, > > the archive pointed to by 'a' is passed to both threads thus the same > variable is modified by both threads at the same time. Morevoer, the > archive::op_test method() is not a constant method, but OK, I am not > sure that all const methods of the API can be used without mutex by > different threads on the same object at the same time. I will double > check this right now. > > To solve your problem I would create two archive objects (yes, memory > will suffer) or avoid using concurrent thread here. Is it possible to get a copy constructor for archive::archive? Better still, would it be possible to have an "archive archive::isolate()" function to obtain a copy of an isolated archive without writing it to disk? That would give an opportunity to run empty methods on a small copy of the archive in a concurrent thread. > Regards, > Denis. Cheers, JB ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/