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

Issue with KqueueWatcher on iOS, falls back to polling. #641

Open
gordongrech opened this issue Sep 21, 2024 · 0 comments
Open

Issue with KqueueWatcher on iOS, falls back to polling. #641

gordongrech opened this issue Sep 21, 2024 · 0 comments

Comments

@gordongrech
Copy link

Hello, not reporting this as a bug as I am new to this library and may be missing something myself.

I am trying to use notify on iOS, using RecommendedWatcher is falling back to polling and selecting KqueueWatcher is giving me a build error as follows:

    let (tx, rx) = std::sync::mpsc::channel();
    let mut watcher = notify::KqueueWatcher::new(tx, Config::default()).unwrap();
    watcher.watch(path.as_ref(), RecursiveMode::NonRecursive).unwrap();

    for res in rx {
        match res {
            Ok(event) =>  handle_job(event),
            Err(e) => log::error!("watch error: {:?}", e),
        }
    }
let mut watcher = notify::KqueueWatcher::new(tx, Config::default()).unwrap();
    |                               ^^^^^^^^^^^^^ could not find `KqueueWatcher` in `notify`

Here are my dependencies in Cargo.toml

[dependencies]
libc = "0.2"
log = "0.4.22"
notify = {version = "6.1.1", features = ["kqueue"]}
serde = {version = "1.0.210", features = ["derive"]}
serde_json = "1.0"

I have also tried adding kqueue and kqueue-sys but the behavior does not change.

Thanks in advance for any assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant