Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: problem with concurrency under stress #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

chrisgraham
Copy link

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

@dg dg force-pushed the master branch 2 times, most recently from cca48ef to 45d6775 Compare June 18, 2024 20:26
@dg
Copy link
Member

dg commented Nov 4, 2024

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

@chrisgraham
Copy link
Author

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants