PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 21 → [WB20] Shared background threads
[WB20] Shared background threads
Débuté par Robert, 10 avr. 2017 18:06 - Aucune réponse
//hostimage.webdev.info/avatars/ihJ2wl9eoXwEAgW0A
Membre enregistré
58 messages
Posté le 10 avril 2017 - 18:06
Hi everyone.
Is it possible to use ThreadExecute() to start a secondary thread that is global to a web service across multiple users?

I have a web service that allows users to update a HFSQL file from their mobile devices.
I would like for a specific web procedure to check for the existence of a global thread, and if there isn't one, to start it.

Currently it seems that each time a client connects to a web service, a new instance is started.
The user hits that check, and ThreadState() returns threadUnknown.

When that connection is done, the server runs the global close procedure and kills the background thread before it gets a chance to finish.

Thanks!