Group: comp.lang.c++
From: ytrembla@nyx.nyx.net (Yannick Tremblay)
Date: Friday, February 15, 2008 11:48 AM
Subject: Re: boost.thread - class derivated from thread

In article <61bbvjF1sj5fkU1@mid.dfncis.de>,
Lars Uffmann wrote:
>
>That a thread cannot be restarted, but instead has to be destroyed and
>reconstructed.

I am not sure why you'd want the parent thread to restart another
thread. I fail to grasp your design.

See threads as multiple workers in a company. All of them have an
inbox for work-to-do. If there's no work to do, the worker sit idle
waiting for stuff in its inbox. (this translate to a
boost::condition::wait ).

Stopping and restarting threads is not really needed in this
abstraction.

Sure, you can always destroy and recreate which is the equivalent of
sack and rehire workers.

Yannick




Safety Articles | Usenet Groups | Usenet News | Bluegrass