Boost logo

Threads-Devel :

Subject: [Threads-devel] Threading features
From: mlimber (mlimber_at_[hidden])
Date: 2009-01-08 15:53:47


Hi, I'm new around here, but I've been using Boost.Thread for several years.

First, I'm wondering why the UpgradeLockable concept (and hence its
associated locks) doesn't support timed locking like SharedLockable
does. And if it's not unfeasible for some reason, is there a plan to
add this?

Second, I see that there has been some discussion of adding a
locking_ptr akin to Alexandrescu's code in "volatile - Multithreaded
Programmer's Best Friend" (http://www.ddj.com/cpp/184403766), but
taking into to account his semi-retractions about using volatile in
his non-Standard way (http://www.ddj.com/cpp/184403774) and
substituting a set of class templates for non-intrusive locking that
would correspond directly to the Boost.Thread mutex concepts -- e.g.,
lockable<T>, shared_lockable<T>, etc. Each *lockable<T> instance would
own an object of type T and would expose it through a
lockable<T>::locking_ptr, shared_lockable<T>::shared_locking_ptr,
shared_lockable<T>::unique_locking_ptr, etc. to help prevent locking
errors.

I, and a goodly number of other users over the years, have
concurrently developed similar classes to leverage RAII and data
hiding in order to reduce locking errors. Seems like a good place to
standardize common practice. Anyone know what the status of such a
project is?

Cheers! --M


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk