Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace spin with parking_lot #318

Merged
merged 2 commits into from
May 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ lazy_static = "1.4"
libc = { version = "0.2", optional = true }
protobuf = { version = "2.0", optional = true }
reqwest = { version = "0.10", features = ["blocking"], optional = true }
spin = "0.5.2"
thiserror = "1.0"
parking_lot = "0.10.2"

[target.'cfg(target_os = "linux")'.dependencies]
procfs = { version = "0.7", optional = true, default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion src/auto_flush.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::counter::{CounterWithValueType, GenericLocalCounter};
use crate::histogram::{Instant, LocalHistogram};
use crate::metrics::MayFlush;
use crate::timer;
use spin::Mutex;
use parking_lot::Mutex;
use std::thread::LocalKey;

/// Delegator for auto flush-able local counter
Expand Down
2 changes: 1 addition & 1 deletion src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::collections::hash_map::Entry as HEntry;
use std::collections::{BTreeMap, HashMap, HashSet};
use std::sync::Arc;

use spin::RwLock;
use parking_lot::RwLock;

use crate::errors::{Error, Result};
use crate::metrics::Collector;
Expand Down
2 changes: 1 addition & 1 deletion src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::hash::Hasher;
use std::sync::Arc;

use fnv::FnvHasher;
use spin::RwLock;
use parking_lot::RwLock;

use crate::desc::{Desc, Describer};
use crate::errors::{Error, Result};
Expand Down