adding Unwatch function for file provider#245
Closed
prateek-narsinghani wants to merge 6 commits intoknadh:masterfrom
Closed
adding Unwatch function for file provider#245prateek-narsinghani wants to merge 6 commits intoknadh:masterfrom
prateek-narsinghani wants to merge 6 commits intoknadh:masterfrom
Conversation
rhnvrm
requested changes
Nov 7, 2023
Author
|
@rhnvrm , I have made the following changes:
|
Owner
|
@prateek-narsinghani thanks for the PR. Could you please add tests for this as well? |
Author
|
@knadh I have added a test for the Unwatch function. Let me know if any further changes are required. |
rhnvrm
reviewed
Dec 4, 2023
65ec25c to
3b8a879
Compare
rhnvrm
requested changes
Mar 6, 2024
0bc0e3e to
91c6bac
Compare
91c6bac to
6dc3b80
Compare
rhnvrm
approved these changes
May 11, 2024
halturin
reviewed
May 27, 2024
| // Unwatch stops watching the files. It closes all the fsnotify watchers | ||
| // and event channels associated with them. | ||
| func (f *File) Unwatch() error { | ||
| return f.w.Close() |
There was a problem hiding this comment.
f.w = nil is missing here for the case of restart watching (there is checking for f.w != nil
halturin
reviewed
May 27, 2024
| os.WriteFile(tmpFile, []byte(`{"parent": {"name": "name2"}}`), 0600) | ||
| wg.Wait() | ||
| } | ||
|
|
There was a problem hiding this comment.
the sequence of Watch/Unwatch/Watch needs to be checked
Owner
|
I finally got around to looking into this. Please take a look at: #306 It addresses a couple of issues in this PR:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.