Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(watch): simplify watch data synchronization (#9154)
### Description Basic view of the futures involved with running `watch` - The `events_fut` takes events from the package changes watcher and folds them into a `ChangedPackages` struct. It then triggers a notify. - The `run_fut` loops waiting for a notification and then performing a run. - Signal handler watching for `SIGINT`s This PR cleans up how packages changes are synchronized between futures: - Removes `RefCell` as `Mutex` already implies mutually exclusive access the the underlying resource - Remove `run_fut` holding onto the changed packages lock for the entirety of it's run. This allows us to switch from `tokio::sync::Mutex` to `std::sync::Mutex`. Which is suggested by the [`tokio::sync::Mutex` docs](https://docs.rs/tokio/latest/tokio/sync/struct.Mutex.html#which-kind-of-mutex-should-you-use) ### Testing Instructions `rustc` + 👀 . Quick gut check by running `turbo watch` and triggering package changes
- Loading branch information