Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Ask Reuben 18 - How To Allow The User To Safely Stop A Long Running Operation  (Read 4565 times)
Reuben B.
Four Js
Posts: 1049

« on: May 07, 2020, 05:17:32 am »

When a program performs something that takes some time to run, such as a loop, a report, a long running database query etc, the front-end has no control.  The runtime is not sitting waiting for an INPUT, MENU etc to be responded too.  However you might want to allow the user to stop the report, database query, batch update etc, typically in case they have entered the wrong parameters, or it is taking longer than expected.

The technique is to have an action-view, typically a button, with the special action name “interrupt”.  When the runtime is executing the long running processes, this button will become active.  The user can then click the button, and an asynchronous interruption request will be sent to the program.

When the run-time receives this event, it will set the INT_FLAG variable to TRUE, and so your code can test if an interrupt has occurred by checking the value of the INT_FLAG variable.


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of
Contributor to
Pages: [1]
  Reply  |  Print  
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines