mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 08:59:26 +02:00
* Fix some debug output
This commit is contained in:
parent
a68a6415f2
commit
5a6bea6180
@ -1,7 +1,7 @@
|
||||
unit fpthreadpool;
|
||||
unit fpthreadpool;
|
||||
|
||||
{$mode ObjFPC}{$H+}
|
||||
{ $DEFINE DEBUGTHREADPOOL}
|
||||
{$DEFINE DEBUGTHREADPOOL}
|
||||
|
||||
interface
|
||||
|
||||
@ -780,17 +780,15 @@ begin
|
||||
T.Task:=aTask
|
||||
else
|
||||
begin
|
||||
{$IFDEF DEBUGTHREADPOOL}DoLog('No available thread for task %s waiting %d to %d',[aTask.ToString,FAddWaitIntervalFAddTimeOut]);{$ENDIF}
|
||||
Flush(output);
|
||||
{$IFDEF DEBUGTHREADPOOL}DoLog('No available thread for task %s waiting %d to %d',[aTask.ToString,FAddWaitInterval,FAddTimeOut]);{$ENDIF}
|
||||
if WaitStart=0 then
|
||||
WaitStart:=Now;
|
||||
Sleep(FAddWaitInterval);
|
||||
TimeOut:=(FAddTimeOut>0) and (MillisecondsBetween(Now,WaitStart)>FAddTimeout);
|
||||
{$IFDEF DEBUGTHREADPOOL}
|
||||
If TimeOut then
|
||||
begin
|
||||
{$IFDEF DEBUGTHREADPOOL}DoLog('TimeOut reached: ',TimeOut);{$ENDIF}
|
||||
Flush(output);
|
||||
end;
|
||||
DoLog('TimeOut reached: ',TimeOut);
|
||||
{$ENDIF}
|
||||
end;
|
||||
Until Result or TimeOut;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user