mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Replace AsyncExecutor with simple closure
This makes everything much simpler. The task type is now defined directly on `Plugin`.
This commit is contained in:
@@ -132,11 +132,10 @@ impl Plugin for Gain {
|
||||
// splits.
|
||||
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
||||
|
||||
// More advanced plugins can use this to run expensive background tasks. See the `AsyncExecutor`
|
||||
// trait's documentation for more information. `()` means that the plugin does not have any
|
||||
// background tasks.
|
||||
type AsyncExecutor = ();
|
||||
fn async_executor(&self) -> Self::AsyncExecutor {}
|
||||
// More advanced plugins can use this to run expensive background tasks. See the field's
|
||||
// documentation for more information. `()` means that the plugin does not have any background
|
||||
// tasks.
|
||||
type BackgroundTask = ();
|
||||
|
||||
fn params(&self) -> Arc<dyn Params> {
|
||||
self.params.clone()
|
||||
|
||||
Reference in New Issue
Block a user