
I started using the spinlock in boost/smart_ptr/detail/spinlock.hpp and discovered that it needs to be manually initialized, even for the spinlock_sync version, which became a nasty bug when it manifested itself. This seems a bit out of sync with the rest of the mutexes in boost::thread. Now, I'm guessing that the fact that the spinlock is in boost::detail means that it's not really for outside consumption (newbie boost user here), but is there something in the works that will be? In the meantime, would it be possible to automatically initialize the spinlock (trivial in the case of spinlock_sync) or are there architectural issues with that? Otherwise, could we add a comment that says "in order to use these spinlocks you must initialize with BOOST_DETAIL_SPINLOCK_INIT" or "move along, these aren't the spinlocks you're looking for."