Allow the Linux event loop on macOS
This commit is contained in:
parent
d37b866115
commit
b7904126ac
2 changed files with 7 additions and 2 deletions
src
|
@ -9,10 +9,11 @@ mod windows;
|
||||||
|
|
||||||
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
|
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
|
||||||
pub(crate) use self::linux::LinuxEventLoop as OsEventLoop;
|
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")]
|
#[cfg(target_os = "windows")]
|
||||||
pub(crate) use self::windows::WindowsEventLoop as OsEventLoop;
|
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::internals::ParamPtr;
|
||||||
use crate::param::Param;
|
use crate::param::Param;
|
||||||
|
|
|
@ -10,6 +10,10 @@ use super::{EventLoop, MainThreadExecutor};
|
||||||
use crate::nih_log;
|
use crate::nih_log;
|
||||||
|
|
||||||
/// See [super::EventLoop].
|
/// 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> {
|
pub(crate) struct LinuxEventLoop<T, E> {
|
||||||
/// The thing that ends up executing these tasks. The tasks are usually executed from the worker
|
/// 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
|
/// thread, but if the current thread is the main thread then the task cna also be executed
|
||||||
|
|
Loading…
Add table
Reference in a new issue