From: Don G (dongryphon_at_[hidden])
Date: 2005-02-13 16:16:27
> Yes, I had considered a mutex pool. One problem is that
> boost::shared_ptr is header-only, and must remain so for
> backward compatibility reasons.
Well, that would preclude such an optimization, though I am not sure
how adding a .cpp file would break code (just makefiles<g>).
> Another problem is that a CRITICAL_SECTION needs to be
> dynamically initialized before use, but the initialization
> itself also needs synchronization.
Unless it happens at global construction time as with Singleton. You
are correct that the pseudo code I posted would not work if mutex ==
> It is easy to apply this optimization to std::tr1::shared_ptr,
> though, since standard libraries don't need to be header-only
> and can initialize things before everything else. ;-)
Good news indeed!
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk