bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread doesn't terminate


From: David Sugar
Subject: Re: Thread doesn't terminate
Date: Sun, 12 Oct 2003 10:43:19 -0400
User-agent: KMail/1.5

First, you cannot directly "restart" a thread that has terminated.  This is 
usually because the thread was originally constructed in the class 
constructor, the object lives as long as it is running, and is usually 
destroyed when it is done.  You could create a new object instance.  But I 
assume you are looking to keep persistant data between exections, and to keep 
them in your derived class?  Is this correct?  If so, I will look at the 
question of thread restartability.  You can suspend and resume a thread, 
however.  Also, what version of Common C++ are you using?

On Friday 10 October 2003 10:22 am, Armin Berres wrote:
> Hello everybody!
>
> I got a problem. Im creating a thread but it does't terminate.
> Thread::isRunning() is always true, even if my Run() Method has terminated!
> The code of the Method is
>
> void ThreadedDeepDensityMap::Run(void)
> {
>       GenerateMap();
>       Exit();
> }
>
> GenerateMap() terminates, Run() too. Why is isRunning still true? Where is
> the fault? When Run() has terminated I want to start it again!
>
> Thanks a lot!
> Bye!
> ___________________________________________________________________________
>___ Die Besten ihrer Klasse! WEB.DE FreeMail (1,7) und WEB.DE Club (1,9) -
> bei der Stiftung Warentest - ein Doppelsieg! http://f.web.de/?mc=021184
>
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp





reply via email to

[Prev in Thread] Current Thread [Next in Thread]