%SYSTEM.BGUtil
hidden abstract class %SYSTEM.BGUtil
This class provides helper functions for monitoring and control of a background task using a shared memory structure. %SYS.BackgroundTask provides an extended surrounding framework and user interface, but this class can, in principle, be used independently.Method Inventory
Methods
If the calling process is not associated with a shared memory structure of this class, then this method does nothing and returns 0. Otherwise, the description that follows applies.
Returns the value of the request code in memory, and it is the callers responsibility to respond appropriately (or ignore it). See Pause() for responding to pause requests. Returns 0 if no request code has been set. In general, callers should simply ignore any unexpected values.
Note that the same check is also done by PostProgress().
Returns null string if the memory structure isn't valid (e.g. the task has since finished and released the memory). Otherwise returns a $list with the following elements.
Return value is identical to PostProgress()
If the calling process is not associated with a shared memory structure of this class, then this method does nothing and returns 0. Otherwise, the description that follows applies.
This function waits until the request code in memory no longer indicates that a pause is requested. While waiting it sets a flag to indicate that the processing is paused. Returns the new value of the request code in memory.
If the calling process is not associated with a shared memory structure of this class, then this method does nothing and returns 0. Otherwise, the description that follows applies.
Returns the value of the request code in memory, and it is the callers responsibility to respond appropriately (or ignore it). See Pause() for responding to pause requests. Returns 0 if no request code has been set. In general, callers should simply ignore any unexpected values.