Skip to content

Commit

Permalink
ROVER-129 Fix commentary
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanrainer committed Aug 28, 2024
1 parent 0b51e26 commit 9cced28
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/rover-std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,18 @@ impl Fs {
Ok(())
}

//TODO: Fix this comment once crossbeam and rayon are gone
/// Spawns a file watcher for a given file, sending events over the channel
/// whenever the file should be re-read
///
/// Example:
///
/// ```ignore
/// let (tx, rx) = crossbeam_channel::unbounded();
/// let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
/// let path = "./test.txt";
/// rayon::spawn(move || {
/// tokio::spawn(move || {
/// Fs::spawn_file_watcher(&path, tx)?;
/// rayon::spawn(move || loop {
/// rx.recv();
/// tokio::task::spawn_blocking(move || loop {
/// rx.recv().await;
/// println!("file contents:\n{}", Fs::read_file(&path)?);
/// });
/// });
Expand Down

0 comments on commit 9cced28

Please sign in to comment.