Skip to content

Commit

Permalink
Use kqueue as recommended watcher on OpenBSD, NetBSD and DragonFly
Browse files Browse the repository at this point in the history
  • Loading branch information
valpackett authored and 0xpr03 committed Apr 16, 2022
1 parent 41a74f0 commit 8399e41
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/lib.rs
Expand Up @@ -111,6 +111,9 @@ pub use crate::fsevent::FsEventWatcher;
pub use crate::inotify::INotifyWatcher;
#[cfg(any(
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonflybsd",
all(target_os = "macos", feature = "macos_kqueue")
))]
pub use crate::kqueue::KqueueWatcher;
Expand Down Expand Up @@ -269,6 +272,9 @@ pub type RecommendedWatcher = ReadDirectoryChangesWatcher;
/// The recommended `Watcher` implementation for the current platform
#[cfg(any(
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonflybsd",
all(target_os = "macos", feature = "macos_kqueue")
))]
pub type RecommendedWatcher = KqueueWatcher;
Expand All @@ -277,7 +283,10 @@ pub type RecommendedWatcher = KqueueWatcher;
target_os = "linux",
target_os = "macos",
target_os = "windows",
target_os = "freebsd"
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonflybsd"
)))]
pub type RecommendedWatcher = PollWatcher;

Expand Down

0 comments on commit 8399e41

Please sign in to comment.