Jump to content

how terminate a threads at the end of the session


Vision

Recommended Posts

Hi, small question

unigui vers 1.9.0.1526

in general if I close a browser tab (whith an unigui session inside)  i receive UniFormAjaxEvent='bclose'  and then TUniBaseJSForm.DoDestroy-> UniFormDestroy 

BUT 

if i execute a thread i dont receive that events. WHY? the session stay alive..

My problem is that i need to terminate a worker thread when the container session is closed.I just can see a UniFormDestroy when i terminate my application:blink:.. 

hint????

tnks

Link to comment
Share on other sites

41 minutes ago, Farshad Mohajeri said:

Hi

The question here is that how and where do you execute the thread?

Hi Mr Farshad


In mainform I create an instance of this thread when a user presses a button. The operation could be very long so I want to be able to invoke tthread.terminate when the session is abandoned by the user.

This object is a private variable of the main form.

Tnks for help

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...