robot-loader icon indicating copy to clipboard operation
robot-loader copied to clipboard

Bug fix: problem with concurrency under stress

Open chrisgraham opened this issue 1 year ago • 2 comments

  • bug fix / new feature? bug-fix for #33
  • BC break? no
  • doc PR: nette/docs#???

This adds additional configurability to RobotLoader, to minimize unnecessary cache rewrites during stress. This reduces the chance of concurrency problems.

chrisgraham avatar Apr 04 '24 22:04 chrisgraham

Wouldn't it be better to set setAutoRefresh(false) in this case ?

dg avatar Nov 04 '24 12:11 dg

In a development environment it's expected that new classes may appear, so auto refresh is needed. But on the same development environment, PHPStan aggressively creates cache files as PHP code. Other environments could have similar issues as it is fairly common for PHP files to be used for caching systems. I believe my PR provides a pretty modest solution to that, just making things a bit more configurable. (Looking at it now I can see somehow it got noisy with other commits, so just look at the ones I did please.)

chrisgraham avatar Nov 05 '24 23:11 chrisgraham