Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-08-21 05:49:44


From: "William Kempf" <williamkempf_at_[hidden]>
> (1) I totally don't follow this. The term "surrogate" doesn't seem to
> apply, so I don't know what you mean by that. In any event, with
> std::fstream "there can be many such objects" and they are "first class
> citizens". I truly don't see any problem here.

The default-constructed thread objects are more constrained in their
functionality than the "primary" thread object - by which I mean the object
that started the thread.

The only thing you can do with a default-constructed thread object is
compare it for (in)equality.

BTW did you consider adding

bool is_current() const;

to boost::thread? This would eliminate the need for default-constructing a
thread object most of the time.

> Please, step back and try to illustrate, hopefully through code examples,
> where you think there are design flaws here.

With this defensive attitude we'll never go anywhere. I'm not talking about
"design flaws," merely different properties and tradeoffs.

--
Peter Dimov
Multi Media Ltd.

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