You are not logged in.
Dear ab,
IMHO there is a bug in this newly introduced function (line 62827 in SynCommons.pas in commit {3638})
procedure TSynBackgroundTimer.WaitUntilNotProcessing(timeoutsecs: integer);
var timeout: Int64;
begin
timeout := GetTickCount64+timeoutsecs*1000;
while not Processing and (GetTickcount64<timeout) do
SleepHiRes(1);
end;
This function is intended to wait until no background task is processed, but currently it waits until a background task is processed.
IMHO "not" should be deleted within the while loop.
while Processing and (GetTickcount64<timeout) do
Best regards,
Paul
Offline
I just saw that you've already changed this code in commit {3639} to
while Processing and (GetTickcount64>timeout) do
But shouldn't it be
while Processing and (GetTickcount64<timeout) do
to work as expected?
Paul
Offline
You are perfectly right.
I made the fix locally on my PC, but the commit wasn't pushed because I compared only by size, not by content, so the > changed into < was not tracked!
My bad!
See https://synopse.info/fossil/info/6424e0d8bc
Thanks for the feedback!
Offline