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

Add debouncing to readdirp call #690

Merged
merged 1 commit into from
Apr 27, 2018
Merged

Add debouncing to readdirp call #690

merged 1 commit into from
Apr 27, 2018

Conversation

bmathews
Copy link
Contributor

@bmathews bmathews commented Feb 26, 2018

See: #685

Previously, when an fs event was fired while a readdir throttle already existed, readdirp would not get called as the result of that event. If the existing/in-progress readdirp call didn't reflect the correct fs tree, e.g. if a new file was added in the middle of the readdirp call, then chokidar wouldn't pick up that the file was added until the next fs event occurred.

This PR adds leading/trailing debouncing to readdirp. If an event comes in while readdirp is already in progress, readdirp will be called again once the existing readdirp is finished.

@coveralls
Copy link

coveralls commented Feb 26, 2018

Coverage Status

Coverage increased (+0.002%) to 98.5% when pulling fd37c16 on bmathews:pr/685 into a95a1f8 on paulmillr:master.

@es128 es128 merged commit 5e75390 into paulmillr:master Apr 27, 2018
srguiwiz added a commit to srguiwiz/chokidar that referenced this pull request May 27, 2018
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.

None yet

3 participants