Accueil → WEBDEV 22 → [WB20] Shared background threads
[WB20] Shared background threads
Débuté par Robert, 10 avr. 2017 18:06 - Aucune réponse
Membre enregistré
86 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.