StopWait procedure
|
acUtils
|
procedure StopWait(var WaitHandle: THandle);
|
The StopWait procedure used to send a signal to WaitHandle, so the program will continue its execution from next line after the call of Wait procedure.
|
|
The Wait and StopWait routines should be used instead "while something do Application.ProcessMessages;", to not utilize CPU time for long time, until some operation will be completed.
|
procedure StopWait(var WaitHandle: THandle);
|
begin
|
if (WaitHandle <> INVALID_HANDLE_VALUE) and (WaitHandle <> 0) then
|
SetEvent(WaitHandle);
|
end;
|
Wait procedure.
|