Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Christof's Multithreading Visual FoxPro
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01164643
Message ID:
01165254
Vues:
12
Thanks Christof.

Some more questions please:

Is there a way to close the threads (stop them running) via code? E.g. user clicks a Stop processing button.

Also, I notice that when I QUIT the main application, the background threads also stop. I expected they would carry on until finished.

Can one just continue to add new threads at will, or is there a recommended max number of threads that are advisable. Is there a rule of thumb - e.g. have no more than one, or no more than 10, 100 ...

Cyril





>Hi Cyril,
>
>
>* ... create a thread here
>
>DECLARE GetExitCodeThread IN WIN32API LONG hThread, LONG @lpExitCode
>lnExitCode = 259
>DO WHILE m.lnExitCode = 259
>  GetExitCodeThread( m.lnHandle, @lnExitCode )
>  * ... do something
>ENDDO
>CloseHandle( m.lnHandle )
>
>
>259 is the STILL_RUNNING exit code. If you only wait for the thread to end you could use the WaitForSingleObject() API function.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform