From 4e53d3a79935a16c3b67304cc80330a07d8c9d80 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 11 Jan 2023 14:51:22 +0100 Subject: [PATCH] Significantly increase task queue capacity This is needed to prevent parameter change events from being dropped. --- src/event_loop.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/event_loop.rs b/src/event_loop.rs index 216c8fd2..4629a833 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -20,7 +20,9 @@ pub(crate) use self::macos::MacOSEventLoop as OsEventLoop; #[cfg(target_os = "windows")] pub(crate) use self::windows::WindowsEventLoop as OsEventLoop; -pub(crate) const TASK_QUEUE_CAPACITY: usize = 512; +// This needs to be pretty high to make sure parameter change events don't get dropped when there's +// lots of automation/modulation going on +pub(crate) const TASK_QUEUE_CAPACITY: usize = 4096; /// A trait describing the functionality of a platform-specific event loop that can execute tasks of /// type `T` in executor `E` on the operating system's main thread (if applicable). Posting a task