Kbase P84031: What is MULTITASKING-INTERVAL Session Attribute
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/11/2004 |
|
Status: Unverified
GOAL:
What is MULTITASKING-INTERVAL Session Attribute
GOAL:
How to change priority of a Process
FACT(s) (Environment):
Microsoft Windows
FIX:
How often Progress filters events between itself and other Windows applications.
This attribute applies to Windows only. It controls how Progress interacts with Window's cooperative multitasking.
On Windows, when execution is blocked for input (by a WAIT-FOR statement, for example), Progress listens for messages from the windowing system. This allows Progress to multitask properly with other Windows applications. However, if your Progress application performs long processing without blocking for input, then it may not multitask properly because Progress does not automatically check for messages from the windowing system. To force Progress to poll for windowing system messages during this time, you can set the MULTITASKING-INTERVAL attribute to a non-zero value. The lower the value, the more often Progress checks for messages. This may decrease Progress performance. The maximum value is 9999. A value of 0 inhibits polling until Progress blocks for input.
If you set MULTITASKING-INTERVAL to a non-zero value for a code segment, reset it to 0 immediately after that code.
On Windows, this attribute has a similar effect on interactive I/O to setting the MULTITASKING-INTERVAL attribute to a low non-zero value, providing a more frequent display refresh. This attribute also provides the same functionality as the ImmediateDisplay parameter in the current environment (which might be the Registry (Windows only) or an initialization file). For more information on environments, see the chapter on user interface environments in the Progress Client Deployment Guide.
You can also use the MULTITASKING-INTERVAL attribute with the SESSION system handle to control how Progress interacts with Windows cooperative multi-tasking by surrounding long 4GL processing loops with this attribute.
The value of the MULTITASKING-INTERVAL attribute determines how often Progress internally filters events (messages) between itself and other Windows applications. As Progress filters these events more often, it executes procedures less efficiently, but allows other windows applications more opportunity to execute. Adjusting the internal event filter is particularly useful during background processing, such as report generation.
The default value, zero, tells Progress never to filter events internally, giving Progress applications maximum access to execution resources. This is perfectly adequate for interactive Progress applications that block for input often, giving other applications enough opportunity to execute.
For values greater than zero, the lower the value, the more often Progress internally filters events, giving other applications greater opportunity to execute, but slowing down Progress execution. However, similar to a TRUE value for the IMMEDIATE-DISPLAY attribute, low non-zero values also cause Progress to refresh the display more often, potentially providing crisper display interaction. Low non-zero values also provide better interoperability with other applications, for example, using Dynamic Data Exchange (DDE).
The maximum value you can set is 9999. In general, set this attribute greater than zero only for code segments that perform lengthy background operations, and reset it to zero before the application blocks for interactive input (for example, executes a WAIT-FOR or UPDATE statement). This attribute provides the same functionality as the MultitaskingInterval parameter in the current environment, which might be the Registry (Windows only) or an initialization file. For more information on environments, see the chapter on user interface environments in the Progress Client Deployment Guide.