[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Waiting for a process to terminate
From:       Jos van den Oever <jos () vandenoever ! info>
Date:       2003-08-10 21:15:24
[Download RAW message or body]

On Sunday 10 August 2003 19:10, Joao Luis Silva Assuncao wrote:
> Hello all,
> I'm using a thread (QThread) to do some heavy job that implies to execute
> multiples times another program. Since it must wait until the process ends
> to execute a new process, I think I can use the signal  processExited to
> know when the process ends, but that implies that the thread must be a
> QObject to receive the signal.

Hello Joao,

You can simply start you thread again without waiting for it to finish. If you 
start a thread when it has not yet finished, it will wait with restarting, 
until the previous running thread has finished.

From http://doc.trolltech.com/3.2/qthread.html#start
If you try to start a thread that is already running, this function will wait 
until the the thread has finished and then restart the thread.

Good luck, Jos

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic