Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-07-02 13:45:44

From: <williamkempf_at_[hidden]>

> No, it really doesn't. Remember, the original pattern didn't use a
> thread group, it used an array of std::auto_ptrs, and it's ease of
> use was nearly identical.

An array of auto_ptrs isn't as flexible as a thread_group. It's fixed size
and can't have threads dynamically added on the fly.

> > You didn't say anything about sharing a thread_group between
> threads, so a
> > non-synchronized thread_group still matches the ad-hoc
> specification given
> > in your 'void foo()' example.
> True... what I had in mind and what was obvious from the posts are
> two different things.


Implementing a thread-safe thread_group is a completely different can of

> > And explicit management is error prone, as you have demonstrated.
> Explicit management isn't error prone. Manual management is. The
> std::auto_ptr<> uses explicit management, and errors don't occur
> because of this.

So why didn't you use "explicit management" in creating the thread_group,
but opted for "manual management" instead?

Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at, gregod at, cpdaniel at, john at