david7
25th September 2013, 10:49
Hi All,

I have wrote a session that has a lot of code to go through (in worktop it works for 30 seconds or so). When I run it from webtop, webtop hangs for around 10 seconds (The cursor is changed to a busy mode and I cannot start any other session or do anything in webtop) and then it returns normal (and the session gives the correct results). However, I have discovered, that while the client side looked busy, the server side was still active! (for example if I was writing a file on the server it was updated during these 10 seconds that the client side was stuck)

I have playing a lot with my code, and discovered even if my code was only suspend(15000), webtop will hang! I even tried to run the code from another wrapper session, that should not wait (modeless) for this code, with different functions (start.session, activate), but webtop will also hang!

My question is: Why!? Why doesn't webtop just run the session, let it work in the background and allow me to continue working on other stuff. Is there a workaround? lets assume my code is simply:

function main()
{
suspend(15000)
message("hi")
}
Any tips?

~ D7

ulrich.fuchs
25th September 2013, 16:48
Look like the session has no gui. This is a known issue with webtop. Try this standard 3GL function:


Syntax:
function void tc.ignore.process (boolean flag [, long processno])

Description

This function indicates if the WebTop should ignore this session (process). By default, the WebTop does not ignore a session. Therefore this function should only be called from a 3GL session which does not present a User Interface. When this function is not called from such 3GL session, the WebTop will seriously delay when such a 3GL Session is started.


Arguments
boolean flag true when the WebTop must ignore this session, otherwise false.

[long processno] The process number of the session to which this function applies. When omitted this function is applied to the current session


Context
This function is implemented in the 4GL Engine and can be used in all script types.

david7
26th September 2013, 13:39
Thanks a lot! It worked!