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

WatchSketch is deadlock susceptible (uses fsnotify without separate goroutine) #68

Closed
egnor opened this issue Jul 10, 2021 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@egnor
Copy link

egnor commented Jul 10, 2021

According to howeyc/fsnotify#7, fsnotify/fsnotify#55 and https://github.com/fsnotify/fsnotify#faq, callers need to start a separate goroutine to select on watcher events (vs where fsnotify.NewWatcher() is called). However, currently WatchSketch() is selecting events in the same thread where the watcher is created, which (apparently) may deadlock.

Disclaimer: I am not very go-literate, so, could easily be misunderstanding things somehow.

@robgonnella
Copy link
Owner

Nice find! Just pushed up changes to address this :)

robgonnella added a commit that referenced this issue Jul 11, 2021
@robgonnella robgonnella added the bug Something isn't working label Jul 11, 2021
@robgonnella
Copy link
Owner

Updated in new beta version, you can try it out via GO111MODULE=on go get github.com/robgonnella/ardi/[email protected]

@egnor
Copy link
Author

egnor commented Jul 30, 2021

Hard to verify but the fix certainly looks good 🙂

@robgonnella
Copy link
Owner

Closing: Addressed in v2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants