mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Move from anymap to anymap3
This avoids a future incompatibility issue. https://github.com/robbert-vdh/nih-plug/pull/202 https://github.com/rust-lang/rust/issues/127323
This commit is contained in:
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -257,10 +257,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
||||
|
||||
[[package]]
|
||||
name = "anymap"
|
||||
version = "1.0.0-beta.2"
|
||||
name = "anymap3"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f1f8f5a6f3d50d89e3797d7593a50f96bb2aaa20ca0cc7be1fb673232c91d72"
|
||||
checksum = "170433209e817da6aae2c51aa0dd443009a613425dd041ebfb2492d1c4c11a25"
|
||||
|
||||
[[package]]
|
||||
name = "approx"
|
||||
@@ -3039,7 +3039,7 @@ name = "nih_plug"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"anymap",
|
||||
"anymap3",
|
||||
"approx 0.5.1",
|
||||
"assert_no_alloc",
|
||||
"atomic_float",
|
||||
|
||||
@@ -76,7 +76,7 @@ docs = []
|
||||
nih_plug_derive = { path = "nih_plug_derive" }
|
||||
|
||||
anyhow = "1.0"
|
||||
anymap = "1.0.0-beta.2"
|
||||
anymap3 = "1.0.1"
|
||||
atomic_float = "0.1"
|
||||
atomic_refcell = "0.1"
|
||||
backtrace = "0.3.65"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//!
|
||||
//! This is essentially a slimmed down version of the `LinuxEventLoop`.
|
||||
|
||||
use anymap::Entry;
|
||||
use anymap3::Entry;
|
||||
use crossbeam::channel;
|
||||
use parking_lot::Mutex;
|
||||
use std::sync::{Arc, LazyLock, Weak};
|
||||
@@ -71,10 +71,10 @@ where
|
||||
}
|
||||
|
||||
// Rust does not allow us to use the `T` and `E` type variable in statics, so this is a
|
||||
// workaround to have a singleton that also works if for whatever reason there arem ultiple `T`
|
||||
// and `E`s in a single process (won't happen with normal plugin usage, but sho knwos).
|
||||
static HANDLE_MAP: LazyLock<Mutex<anymap::Map<dyn std::any::Any + Send>>> =
|
||||
LazyLock::new(|| Mutex::new(anymap::Map::new()));
|
||||
// workaround to have a singleton that also works if for whatever reason there are multiple `T`
|
||||
// and `E`s in a single process (won't happen with normal plugin usage, but who knows).
|
||||
static HANDLE_MAP: LazyLock<Mutex<anymap3::Map<dyn std::any::Any + Send>>> =
|
||||
LazyLock::new(|| Mutex::new(anymap3::Map::new()));
|
||||
|
||||
impl<T: Send + 'static, E: MainThreadExecutor<T> + 'static> WorkerThread<T, E> {
|
||||
fn spawn() -> Self {
|
||||
|
||||
Reference in New Issue
Block a user