Subj : Re: [RFC] Boost.Threads on its way to C++0x To : comp.programming.threads From : Ben Hutchings Date : Fri Apr 29 2005 07:48 pm Peter Dimov wrote: > Ben Hutchings wrote: >> >> The two thread constructors are a crime against type-safety. Thread >> starter/joiners and identifiers should be separate types. > > Why should starters/joiners be types? Why not functions returning/taking an > id? I wouldn't argue that starting and joining need to be combined in a single class. However thread joinability is a resource which had better not be leaked. Some kind of resource management is needed and the non-default constructor of boost::thread provides RAII. -- Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once. .