|
Boost : |
From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2007-12-18 03:47:04
Frank Mori Hess <frank.hess <at> nist.gov> writes:
> On Monday 17 December 2007 09:59 am, Anthony Williams wrote:
> >
> > I have removed detail::thread_move(). Instead, I've added boost::move
> > overloads for the movable types in boost.thread: thread, unique_lock<>,
> > shared_lock<>, upgrade_lock<>. Since these overloads take specific
> > parameter types, they shouldn't cause the problems that the unconstrained
> > template caused before.
>
> Have you considered making the mutex types movable? I'm working on some mutex
> wrapper classes and it would be nice to be able to move construct the wrapper
> from an object of its templated mutex type, instead of assuming the mutex
> type is going to be default constructible.
On POSIX, mutex types are not movable. Making boost::mutex movable would mean
that either we could not use pthread_mutex_t internally, or we would have to
dynamically allocate it. I don't think it makes sense to restrict the
implementation in that way.
Anthony
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk