Advertisement
Guest User

threadpool contention logging

a guest
Dec 9th, 2020
32
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement