Boost logo

Boost :

Subject: Re: [boost] [UUID] Still alive?
From: Andy Tompkins (atompkins_at_[hidden])
Date: 2008-09-23 15:16:40


Hi,

On Mon, 22 Sep 2008 10:42:55 +0200, "Manuel Fiorelli"
<manuel.fiorelli_at_[hidden]> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk