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"
|
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anymap"
|
name = "anymap3"
|
||||||
version = "1.0.0-beta.2"
|
version = "1.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8f1f8f5a6f3d50d89e3797d7593a50f96bb2aaa20ca0cc7be1fb673232c91d72"
|
checksum = "170433209e817da6aae2c51aa0dd443009a613425dd041ebfb2492d1c4c11a25"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "approx"
|
name = "approx"
|
||||||
@@ -3039,7 +3039,7 @@ name = "nih_plug"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"anymap",
|
"anymap3",
|
||||||
"approx 0.5.1",
|
"approx 0.5.1",
|
||||||
"assert_no_alloc",
|
"assert_no_alloc",
|
||||||
"atomic_float",
|
"atomic_float",
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ docs = []
|
|||||||
nih_plug_derive = { path = "nih_plug_derive" }
|
nih_plug_derive = { path = "nih_plug_derive" }
|
||||||
|
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
anymap = "1.0.0-beta.2"
|
anymap3 = "1.0.1"
|
||||||
atomic_float = "0.1"
|
atomic_float = "0.1"
|
||||||
atomic_refcell = "0.1"
|
atomic_refcell = "0.1"
|
||||||
backtrace = "0.3.65"
|
backtrace = "0.3.65"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//!
|
//!
|
||||||
//! This is essentially a slimmed down version of the `LinuxEventLoop`.
|
//! This is essentially a slimmed down version of the `LinuxEventLoop`.
|
||||||
|
|
||||||
use anymap::Entry;
|
use anymap3::Entry;
|
||||||
use crossbeam::channel;
|
use crossbeam::channel;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use std::sync::{Arc, LazyLock, Weak};
|
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
|
// 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`
|
// 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 sho knwos).
|
// and `E`s in a single process (won't happen with normal plugin usage, but who knows).
|
||||||
static HANDLE_MAP: LazyLock<Mutex<anymap::Map<dyn std::any::Any + Send>>> =
|
static HANDLE_MAP: LazyLock<Mutex<anymap3::Map<dyn std::any::Any + Send>>> =
|
||||||
LazyLock::new(|| Mutex::new(anymap::Map::new()));
|
LazyLock::new(|| Mutex::new(anymap3::Map::new()));
|
||||||
|
|
||||||
impl<T: Send + 'static, E: MainThreadExecutor<T> + 'static> WorkerThread<T, E> {
|
impl<T: Send + 'static, E: MainThreadExecutor<T> + 'static> WorkerThread<T, E> {
|
||||||
fn spawn() -> Self {
|
fn spawn() -> Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user