From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-12-29 16:29:33
--- Jody Hagins <jody-boost-011304_at_[hidden]> wrote:
> That's a start, I guess (though I'm not sure what macros to check).
If I do as Peter suggested and check for the absence of
BOOST_HAS_THREADS you probably don't need to do anything.
> However, the control flow for the demuxer will be executed in
> a single thread, and should not be doing anything with
> synchronization primitives.
Actually the demuxer is partly intended to provide you with a
thread-safe way of passing work across threads, i.e.
demuxer.post() can be called from any thread to invoke a
function in the single thread that is calling demuxer.run().
> Part of what bothers me is that boost is a modern C++ library,
> and as such has many tools to allow different practices, yet
> we still use IFDEFs and blindly insert synchronization
> primitives in places where they are not needed.
I'm going to talk about this more in another reply, but I
believe that the current interfaces can be implemented to be
thread-safe without using mutexes.