Boost logo

Boost :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2004-11-04 07:58:43


Having followed the discussion about the availability of direct locking
of mutexes,
I am somewhat surprised that there are free functions available for this
purpose.

Is this by intent? Is using them simply bad practice?

I.e.:

boost::mutex m1;
boost::detail::thread::lock_ops<boost::mutex>::lock(&m1);

is e legal statement. (And indeed is locking the mutex.)

Yes I've seen the "detail". Does this imply: Anything that is detail
definitely should
not go into user programs?

I am asking this not for pure 'academic' reasons. What I am trying to do
is to find
out whether it is possible to write a small wrapper over the existing
classes to support
a kind of cancellability for my threads, until the "real thing" will be
available.

Thank you.

Roland


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk