Boost logo

Boost Users :

From: Martin Pasdzierny (martin_at_[hidden])
Date: 2004-12-10 03:40:25


Hi Boost::Thread users (developers)

During the past months I had to create a portable thread management shell around
boost::threads to allow a simple thread management.

The idea was to (implicitly) put each thread into a hierarchy
(just like forked processes but with more features than boost::threadgroup offers).
These threads now share a global structure to allow global access to their control
interface (mainly a 'stop!' flag).
Additionally I wanted to make threads requested to stop (triggered by themselves or from outside)
implicitly stop their children and finally remove themselves from the thread management structures.

It took me some time to make this approach a stable implementation
(would have been much easier if boost::threads exposed their internal and platform-specific id).

I think the idea of hierarchially organized threads is quite common and wonder how it could be
*elegantly* designed using boost::threads.

Any suggestions are welcome !

Martin.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net