diff --git a/src/context.rs b/src/context.rs index deb42694..30daf05f 100644 --- a/src/context.rs +++ b/src/context.rs @@ -9,10 +9,11 @@ mod windows; #[cfg(all(target_family = "unix", not(target_os = "macos")))] pub(crate) use self::linux::LinuxEventLoop as OsEventLoop; +// For now, also use the Linux event loop on macOS so it at least compiles +#[cfg(target_os = "macos")] +pub(crate) use self::linux::LinuxEventLoop as OsEventLoop; #[cfg(target_os = "windows")] pub(crate) use self::windows::WindowsEventLoop as OsEventLoop; -#[cfg(target_os = "macos")] -compile_error!("The macOS event loop has not yet been implemented"); use crate::param::internals::ParamPtr; use crate::param::Param; diff --git a/src/context/linux.rs b/src/context/linux.rs index 66de482c..a92ee872 100644 --- a/src/context/linux.rs +++ b/src/context/linux.rs @@ -10,6 +10,10 @@ use super::{EventLoop, MainThreadExecutor}; use crate::nih_log; /// See [super::EventLoop]. +#[cfg_attr( + target_os = "macos", + deprecated = "macOS needs to have its own event loop implementation, this implementation may not work correctly" +)] pub(crate) struct LinuxEventLoop<T, E> { /// The thing that ends up executing these tasks. The tasks are usually executed from the worker /// thread, but if the current thread is the main thread then the task cna also be executed