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

PollWatcher: unify signature of new and with_delay #360

Merged
merged 1 commit into from Sep 29, 2021

Commits on Sep 18, 2021

  1. PollWatcher: unify signature of new and with_delay

    * Move `event_handler` logic from `new` to `with_delay` to be able to call:
    ```rust
    let (tx, rx) = std::sync::mpsc::channel();
    let mut watcher = PollWatcher::with_delay(tx, Duration::from_secs(1))?;
    ```
    instead of:
    ```rust
    let (tx, rx) = std::sync::mpsc::channel();
    let mut watcher = PollWatcher::with_delay(Arc::new(Mutex::new(tx)), Duration::from_secs(1))?;
    ```
    
    * Add documentation
    jhscheer committed Sep 18, 2021
    Configuration menu
    Copy the full SHA
    3158753 View commit details
    Browse the repository at this point in the history