diff --git a/nr/Cargo.toml b/nr/Cargo.toml index fd77b224..599c4011 100644 --- a/nr/Cargo.toml +++ b/nr/Cargo.toml @@ -25,6 +25,11 @@ static_assertions = "1.1.0" loom = { git = "https://github.com/gz/loom.git", branch = "try_recv" } arr_macro = "0.1.3" +[target.'cfg(not(loom))'.dependencies] +# Config based dependency due to https://github.com/tokio-rs/tokio/issues/2463 +tokio = {version = "1.11.0", features = ["rt", "macros"]} +futures = "0.3.17" + # Add debug symbols on the release build so that we can debug performance issues [profile.release] debug = true @@ -33,8 +38,6 @@ debug = true chashmap = "2.2" rand = {version = "0.8", features = ["small_rng"]} env_logger = "0.9.0" -tokio = {version = "1.11.0", features = ["rt", "macros"]} -futures = "0.3.17" [features] unstable = [] \ No newline at end of file diff --git a/nr/src/replica.rs b/nr/src/replica.rs index 1b2c8806..5a8effa5 100644 --- a/nr/src/replica.rs +++ b/nr/src/replica.rs @@ -646,7 +646,7 @@ where // Append all collected operations into the shared log. We pass a closure // in here because operations on the log might need to be consumed for GC. - if buffer.len() > 0 { + { let mut data = self.data.write(next); let f = |o: ::WriteOperation, i: usize| { #[cfg(not(loom))]