Advertisement
Guest User

threadpool contention logging

a guest
Dec 9th, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1.  
  2. SynCrtSock.pas
  3.  
  4. 1. remove comments so that SYNCRTDEBUGLOW is defined
  5. {.$define SYNCRTDEBUGLOW}
  6.  
  7. 2. Find implementation of function TSynThreadPool.Push
  8. at the end of the function replace :
  9.  
  10. if not result then
  11. inc(fContentionAbortCount);
  12.  
  13. with
  14.  
  15. {$ifdef SYNCRTDEBUGLOW}
  16. if not result then
  17. begin
  18. inc(fContentionAbortCount);
  19. TSynLog.Add.Log(TSynLogInfo.sllWarning, 'threadpool contention detected!');
  20. end;
  21. {$else}
  22. if not result then
  23. inc(fContentionAbortCount);
  24. {$endif}
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement