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

Handle awf unlink and polling race condition #394

Closed

Conversation

alexpusch
Copy link
Contributor

No description provided.

@alexpusch alexpusch changed the title Handle unlink race condition Handle awf unlink and polling race condition Nov 7, 2015
cancelWait: function() {
delete this._pendingWrites[path];
clearTimeout(timeoutHandler);
return callback();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that the pending function will be invoked. I know it won't do anything since err and stat are null, but I still think we should not allow it to just hang there

@es128
Copy link
Contributor

es128 commented Nov 7, 2015

I like this change, but the inconsistency about treating the emitting function like an async-flow-pattern callback remain. I refactored a bit further in https://github.com/paulmillr/chokidar/tree/alexpusch-awf-fix-refactor in an attempt to make it clearer (to avoid confusion that if callback isn't called it would disrupt the necessary control flow)

@alexpusch
Copy link
Contributor Author

Looks great, change in terminology achieved exactly what you said. I'll update my PR

@es128
Copy link
Contributor

es128 commented Nov 7, 2015

No need. Your commit is already there. Will just merge the branch to master.

Thanks for your help with this.

@es128 es128 closed this Nov 7, 2015
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