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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...