Hidden 100 ms sleep in a library function used to launch scripts
SGS has recently discovered a hidden 100[msec] sleep in a library function used to launch scripts. This function is use by many applications, including “evnt_rsp”, “gp_test”, most apps that use ASC, etc.
In “gp_test”, when the @BACKGROUND and @BACKGROUND_TASK keywords are used, it was forcing the mode execution time to be at least 100[msec]. Normally, this probably would not cause a problem, because the extra 100[msec] is not added to the mode timeout. HOWEVER, if the mode timeout was specified as -1[s] (immediate) or as any value less that 100[msec] it will be a problem and will ensure that the mode execution time is exactly 100[msec]. This can cause an error in a procedure that contains a loop where the loop time must be precisely controlled and the loop contains one or more modes where these 2 keywords are used and the mode timeout is -1[s] or less than 100[msec].
SOLUTION:
- A fix for this will be in the 6.2 version of CyFlex (about to be released) and bug fixes will be done for 6.1.2 and 6.0.5 and can be made available if needed.
- In general, we should avoid launching scripts that perform actions that can be executed using existing gp_test keywords. For example, we have encountered scripts that use a series of commands such as “svar”, “u_mode”, “u_target”, etc. There are equivalent gp_test keywords that perform these actions and don’t require the excessive cpuload of loading an executable from disk