José

I made tests with two boolean flags.
One flag is switched to true when the Thread starts and false when it ends. The other quits the thread when it is true.

Now you can do this...

MyThread
        Run()
                myRunFlag = true
                while (anything else) and not(myStopFlag)
                        ...
                        ...
                wend
                myRunFlag = false

MainProgram
        Anywhere()
                if (myRunFlag) then
                        myStopFlag = true
                        while (myRunFlag)
                                App.DoEvents()
                        wend
                end
                myStopFlag = false
                MyThread.Run()

This seems to be a solution without killing threads. You just have to take care that the thread exits asap when the property myStopFlag is set to true.

Best,
Marcel



On 08.05.2006, at 21:01, Marcel wrote:

I am on the Mac - didn't test it on Windows.
This doesn't sounds good... please tell me if you find a solution. I have about 4 weeks, before I have to port my code to Win.

Best,
Marcel

On 08.05.2006, at 17:07, José Andrés wrote:


Which platform are you working on?

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to