Run Internal procedure asynchronous

agiusp

New Member
Does anybody knows how to run a internal procedure of a persistant program in a asynchronous way without using Appserver?

The following compile fine but it's ran synchronously:

RUN internal-proc IN my_pers_prg_handle ASYNCHRONOUS.

Thx
 

RealHeavyDude

Well-Known Member
The 4GL runtime is not multi-threaded and therefore it is not possible to have an asynchronous procedure call within the same session. The reason why this code compiles is because the handle you're specifying could also be the handle to a procedure running persistently on the AppServer. The compile is not aware as to where a handle variable is pointing to at runtime.



HTH, RealHeavyDude.
 

agiusp

New Member
I don't know if you're familiar with Google chart API but my concern is the following:

I try to use the Google API to load beautiful charts image based on specific URL that I format myself. The first time the graph is very long to load (>20sec) and I don't know why. After this all the other graph can load very speefully and I'm trying to find a workarround to avoid the user screen freeze during the load-image.

I'm working with OE studio 10.1B (win side) .

May be you can help?
Thx again
 

RealHeavyDude

Well-Known Member
AFAIK, as the Progress runtime is single-threaded, there is no way to interfere when a statement is executed at runtime. When you do an image-load which takes a long time there is no way to "unfreeze" the session. Maybe an OCX can do that for you - if it is multi-threaded or lets you specify a time-out. But, I am not very familiar with the use of OCXs in the 4GL.

Regards, RealHeavyDude.
 

tamhas

ProgressTalk.com Sponsor
In 10.2B, you will get STOP-AFTER on blocks which can be used to abort excessively long running actions ... but if you want the chart and the chart takes 20s to generate, that isn't going to help any.
 
Top