Kbase P168677: Default multitasking interval set to 0 causes session to appear unresponsive after returning the foc
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/24/2010 |
|
Status: Unverified
SYMPTOM(s):
Default multitasking interval set to 0 causes session to appear unresponsive after returning the focus to the ABL window
OpenEdge application does not refresh its interface and it appears unresponsive
Issue more pronounced on Windows 2008 operating system
FACT(s) (Environment):
OpenEdge application ABL code executes large query, transaction or otherwise similar block, or a loop that prevents the AVM from processing messages in the Windows message queue
User switches focus to another application and then returns focus back to a OpenEdge application
Setting multitasking interval to a low non-zero value allows Windows to repaint OpenEdge application interface
Windows
OpenEdge 10.x
CAUSE:
This is expected behavior. Some versions of Windows identify and handle non-responsive windows differently from other versions.
An ABL window will not paint on any version of Windows if multitasking interval is set to 0 and the ABL code is in a loop that prevents
the AVM from processing messages in the Windows message queue.
FIX:
Set Multitasking-Interval to a value greater than 0, or execute the PROCESS EVENTS statement periodically inside the loop
in order for the window to paint normally while the loop is executing.
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.
An example how to manage that within the application code :
SESSION:MULTITASKING-INTERVAL = 100 .
/* Execute block that has some loop, executes long query, transaction etc. */
...
SESSION:MULTITASKING-INTERVAL = 0 .
Another approach is for example with PROCESS EVENTS :
/* Start of the block that contains some loop with transactions and not having any input blocking statements */
...
PROCESS EVENTS.
...
/* End of that block */