mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Add an AsyncExecutor associated type to Plugin
This will make it possible to run background tasks in a type safe way. Sadly, this does mean that every plugin now needs to define the type alias and constructor function since Rust does not yet support defaults for associated types.
This commit is contained in:
@@ -123,6 +123,9 @@ impl Plugin for LoudnessWarWinner {
|
||||
const DEFAULT_INPUT_CHANNELS: u32 = 2;
|
||||
const DEFAULT_OUTPUT_CHANNELS: u32 = 2;
|
||||
|
||||
type AsyncExecutor = ();
|
||||
fn async_executor(&self) -> Self::AsyncExecutor {}
|
||||
|
||||
fn params(&self) -> Arc<dyn Params> {
|
||||
self.params.clone()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user