CPU100% in while loop
Author: firstname.lastname@example.org (Marco)
Hi, I saw that in a cycle on entity, clear/e "entity" ... ;fields assignement retrieve/e "entity" if ($status = 0) setocc "entity", 1 while ($status > 0) ... ; some elaboration setocc "entity", curocc(entity) + 1 endwhile endif the uniface.exe, or userver.exe, process takes all available CPU, so if there is only one processor the machine becomes unusable for the processing time. If I use a sleep statement, with 1 millisecond, the CPU doesn't take all the resources but the processing time increases. there is a solution to ensure that the loop does not take all the resources without use a sleep statement? There isn't a implicit sleep comunication to the SO so it manages others processes? Thanks.