Boost logo

Boost :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-11-01 14:51:16

Anthony Williams wrote:
> OK, now I see where Roland is coming from, as his POD mutex does just
> that.

Exactly :-)

I just tried to extend, like you were suggesting, my POD mutex as
an aggregate, i.e.:

struct mutex {
        impldef-type * p;

Works, fine. Ok next step:

struct mutex {
        void lock() { .... }
        void unlock { .... }
        ... various other POD's to hold queue entry ...
        implde-type * p;

Ok. The lock unlock are no problem, but "... various other POD's
to hold queue entry ..." need to be thread specific!

I did not yet put this to code, but it is a disprove of my original
believe that it is unfeasible to provide lock unlock to my POD/aggregate

So it would be feasible, but locking on the mutex would be a bit slower
due to the thread_specific_ptr.

But this puts some burden on the thread_specific pointer too:
It also must be static initializeable! So it cannot be the boost one.


Boost list run by bdawes at, gregod at, cpdaniel at, john at