Skip to content

Commit

Permalink
Avoid pulling tokio crate with loom.
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitbhrdwj authored and gz committed Nov 17, 2021
1 parent ae30c03 commit d8ebb81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions nr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = []
2 changes: 1 addition & 1 deletion nr/src/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: <D as Dispatch>::WriteOperation, i: usize| {
#[cfg(not(loom))]
Expand Down

0 comments on commit d8ebb81

Please sign in to comment.