TJobs Waitfor All
procedure TJobs.WaitForAll(Timeout : Cardinal = 0); var dtStart : TDateTime; begin dtStart := Now; while ((FJobs.Count > 0) or (FJobsInProcess > 0)) and ( (Timeout = 0) or ((Timeout > 0) and (MillisecondsBetween(dtStart,Now) >= Timeout)) ) do sleep(10); end;
Should be procedure TJobs.WaitForAll(Timeout : Cardinal = 0); var dtStart : TDateTime; begin dtStart := Now; while ((FJobs.Count > 0) or (FJobsInProcess > 0)) and ( (Timeout = 0) or ((Timeout > 0) and (MillisecondsBetween(dtStart,Now) <= Timeout)) ) do sleep(10); end;
Comments (3)
-
-
Merged in jsouthwell/cocinasync/develop (pull request #18)
Addresses Issue
#9.→ <<cset 6b36020c4d65>>
-
- changed status to resolved
Resolved with commit 0d95c729693e0853e1b4e53ee9ddcc785c171503
- Log in to comment
Addresses Issue
#9.→ <<cset 0d95c729693e>>