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

更新配置用的file_put_contents能保证读取不受影响吗? #29

Open
LF-DevJourney opened this issue Jun 3, 2024 · 1 comment

Comments

@LF-DevJourney
Copy link

项目中使用的file_put_contents来写配置文件,这时候正常的request处理,会读取配置文件,感觉这里是有问题的。我之前项目中一边读一边写文件,就出现读取问题的。

@LF-DevJourney
Copy link
Author

不能,file_put_contents并不是原子操作,因此写过程中,其他进程可能读取到不完整的文件。

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

No branches or pull requests

1 participant