add singleton option to prevent concurrent child processes
hbt opened this issue · 0 comments
hbt commented
Current behavior:
- start watcher on a directory and execute a command when a file changes
- change a file
- command execute
- change file again
- another child process executes in parallel
This is problematic in cases where the command is a long build or anything that shouldn't be running in parallel.
Current solution:
- add a locking mechanism within the script to ignore the watcher
Desired solution:
- watcher should have a --singleton option which waits until a command and its child processes are done running before executing it again