Consultor Eletrônico



Kbase P18436: What is the SESSION:MULTITASKING-INTERVAL attribute and why would it need to be used?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
Status: Unverified

GOAL:

What is the SESSION:MULTITASKING-INTERVAL attribute and why would it need to be used?

FIX:

The MultitaskingInterval setting determines how often Progress processes certain system messages while it executes 4GL code. On 16-bit versions of Windows (now obsolete), applications had to be designed to share access to the message system; if an application didn't play fair, other applications would not get an opportunity to run. MultitaskingInterval allowed you to control how often other applications were allowed to run; higher settings could improve the performance of your 4GL application at the expense of other applications running on the system.

32-bit versions of Windows (all versions currently supported by the Progress Company) no longer operate this way; the operating system ensures that each application will get a chance to run. However, an application still needs to process messages in a timely manner to ensure that its own windows repaint often and that the user can access window controls such as the system menu. In 32-bit versions of Progress, MultitaskingInterval only affects the specific Progress process which sets it; it has no effect on other applications running on the system, or even on other Progress processes running on the system. Each Progress process can be set to a different value if needed.

Normally, you do not need to worry about the MultitaskingInterval setting because Progress processes system messages quite often regardless of the setting. However, in situations where Progress is in a tight loop that does not involve displaying anything on the screen, Progress may not process messages often, if at all. This is when you need to employ the MultitaskingInterval setting. In these cases you will notice that your application's windows will not repaint themselves quickly when covered by other windows and you will not have access to the system menu on your application's windows (by left-clicking on the application's icon in the window's caption bar). If you notice these problems, setting MultitaskingInterval to a non-zero value should solve the problem.

MultitaskingInterval defaults to 0 (zero) for a non-batch client; a batch client defaults to 50. The default can be overridden by setting MultitaskingInterval to a positive value in the Startup section of progress.ini or the corresponding location in the Windows registry. A maximum value of 9999 is allowed. The choice of value is less important now than it was in 16-bit systems. It is more like an on/off switch now. This is because machines have become so fast that you won't notice much difference between non-zero settings. Progress Software recommends setting MultitaskingInterval to 9999 if you need to use it (assuming your application is running on a fairly fast machine). Progress will still process messages many times per second at this setting. At lower settings, Progress will waste time looking for messages which most likely won't be waiting. If a setting of 9999 does not solve the problem, lower it until you find a setting which does.