Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWAppFormAsyncPageUnloaded generates exception (Priority support)
#2
I don't understand your problem here.

> And after the end of the internal timer, 15 s default, it tries to destruct the application even if the Terminate() function was not called.

The only thing that SelfDestruct does it setting the application to be collected by the clean up thread, when the 15 seconds time expires. The clean up thread runs in 1 minutes interval, so it may take from 15 seconds to 1 minute + 15 seconds for it to occur. Once SelfDestruct is called the destruction of that session can only be interrupted within the 15 seconds timeout, if that session receives a new request (this happens automatically).

The posted demo shows an example of how SelfDestruct *could* be used, not how you should use it. It is up to you identify if you can call it or not. There is no way for IntraWeb to understand your own code and decide it it can terminate the session or not.


In that demo, I only have 1 active form at any time - by design - so it makes sense to call SelfDestruct during PageUnload.  As I said above, it is up to you to decide if you should call SelfDestruct or not. The demo is not a strict guide on how to use the feature.
Reply


Messages In This Thread
RE: IWAppFormAsyncPageUnloaded generates exception (Priority support) - by Alexandre Machado - 04-15-2023, 11:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)