Boost logo

Boost :

Subject: Re: [boost] [pool] Conversion to Boost.Thread for singleton_pool
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2008-10-23 12:58:22

Chris Newbold wrote:
> Boost.Pool contains a private mutex implementation used as the default mutex type for singleton_pool
> (which provides a thread-safe API). Now that Boost.Thread is
well-established and in line with TR1,
>I'd like to jettison the private mutex implementation inside
Boost.Pool and switch
>the default mutex type to be boost::mutex.
> The obvious consequence of this change is that singleton_pool becomes dependent
> on Boost.Thread. The dependency would exist only for singleton_pool and
>its clients and would not affect the other Boost.Pool interfaces.
> Anyone have any objections or reasons why this wouldn't be a good idea?

Because Boost.Thread mutex might be a bit heavier (at least in windows)
than Boost.Pool's CriticalSection calls. I see Anthony is using atomic
operations in Boost.Thread to minimize the issue of the internal event
so please profile the performance before changing this. Also, I don't
like much the idea of another linking dependency, but that's a personal
taste issue.

> -Chris



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