-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ refactor(file-manager): improve locking and writing logic for file…
… operations - Updated `SafeFileReader` to ensure locks are released only when files are properly initialized. - Enhanced the `SafeFileWriter` lock mechanism to increase retries from 3 to 5 and delay from 100ms to 200ms for better robustness. - Removed redundant try-finally block in the `__call` method of `SafeFileWriter`. - Changed write methods to return the actual number of bytes written (`int|false`) instead of boolean, improving API clarity and usability. - Added exceptions to the destructor in `SafeFileWriter` to handle potential resource issues during cleanup. BREAKING CHANGE: Modified the return type of multiple private write methods in `SafeFileWriter` from `bool` to `int|false`. This impacts integrations relying on previous boolean responses.
- Loading branch information
Showing
4 changed files
with
51 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ vendor | |
composer.lock | ||
git-story_media | ||
test.php | ||
diff.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters