
Hi, On Mon, 22 Sep 2008 10:42:55 +0200, "Manuel Fiorelli" <manuel.fiorelli@gmail.com> said:
Hi, I saw that you don't serialize accesses to member data, so I wouldn't call your class thread-safe but reentrant, since it can be safely instantiated in several concurrent threads, which shouldn't however share the same instance.
I agree, an instance can not be shared between threads without proper external synchronization.
Maybe I have a wrong idea of what a thread safe class should be....
I use the definitions from Qt: < http://doc.trolltech.com/4.1/threads.html#reentrancy-and-thread-safety>
I think that UUID doesn't need synchronization, but it is important that reading the documentation the user cannot misunderstanding the library guarantees against multi-threading.
I agree. I will modify the documentation to reflect this.
I run on my Linux box (equipped with gcc (GCC) 4.3.0) the tests "test_uuid.cpp" and "test_sha1.cpp" which pass. I didn't run the "test_serialization.cpp" since I use a prepackaged version of boost.
Obiuvsly, I run the tests against the source with the modifcations I posted on this mailing list.
Best regards, Manuel Fiorelli
Thanks, Andy Tompkins