
Frank Mori Hess wrote:
I tend to agree here -- I had to wrap all thread usage behind a PIMPL because previously it would include <windows.h>, which is deadly for compile times.
Unless there are very compelling reasons to move the stuff into the header (like, all other mutex implementations in Boost get removed), then I can understand it, but otherwise I'd leave it as it is. The thing is, the argument that lightweight_mutex /could/ be removed is bogus until there is some definite plan to remove it while doing this change, otherwise we'll end up with having both to pay the price of higher compile times in Boost.Thread and having a mostly redundant class somewhere else.
Isn't arguing that boost::mutex shouldn't be made header-only due to concerns about compile time even more bogus? The reason the header-only suggestion was brought up in the first place was that the code in question is so trivial it won't impact compile times to put in entirely in the header.
The current version of boost/thread/pthread/mutex.hpp directly includes 11 headers. BR, Dmitry