-
Notifications
You must be signed in to change notification settings - Fork 38
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
Possible deadlocks with overlapping subscriptions #135
Comments
@devongovett 👋 curious if you could comment on this issue. So far, in VS Code we have actively prevented file system watchers from overlapping, i.e. no watcher was ever watching any folder or sub-folder that was already watched by another watcher in the same process. However, going forward, I am thinking to relax this condition to enable VS Code extensions to have more powerful file watching capabilities with custom exclude rules, which today is just not possible. My fear is that this could introduce subtle issues that we have not had before if multiple extensions install watchers over same or overlapping paths. I also noticed the PR to migrate to threadsafe functions (#146), which maybe helps for this issue, if its an issue at all? @abrenneke have you ever tried to reproduce with newer versions of parcel watcher? |
This is a followup to #39 and specifically @bpasero's comment and my comment.
I have no definitive proof, but our CLI app (interactive app that runs builds) was occasionally completely freezing. We finally found a reproduction - we had a
java
folder that wasn't ignored for the parcel watcher, and when we ran a java build concurrently with other CPU work in the CLI app the app would completely freeze (node event loop unresponsive).The app was organized so that
.subscribe
was called for the same folder several times, so there were 5 or so watchers on the same folder. After reading the comment above, I refactored the app to reuse a single watcher and a single.subscribe
call. I've been unable to reproduce the freeze since then.Considering that the freeze was
Makes me think there's a deadlock of some sort here. I'm on the latest version
2.1.0
.My questions I suppose are:
Thanks for the awesome package though, it's been so much better than every other watcher!
The text was updated successfully, but these errors were encountered: