Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

remove re-export of parking_lot in util #6435

Merged
merged 1 commit into from
Sep 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ number_prefix = "0.2"
rpassword = "0.2.1"
semver = "0.6"
ansi_term = "0.9"
parking_lot = "0.4"
regex = "0.2"
isatty = "0.1"
toml = "0.4"
Expand Down
1 change: 1 addition & 0 deletions dapps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ futures = "0.1"
linked-hash-map = "0.3"
log = "0.3"
parity-dapps-glue = "1.7"
parking_lot = "0.4"
mime = "0.2"
mime_guess = "1.6.1"
rand = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion dapps/src/apps/fetcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use hyper;
use hyper::status::StatusCode;

use {Embeddable, SyncStatus, random_filename};
use util::Mutex;
use parking_lot::Mutex;
use page::LocalPageEndpoint;
use handlers::{ContentHandler, ContentFetcherHandler};
use endpoint::{Endpoint, EndpointPath, Handler};
Expand Down
2 changes: 1 addition & 1 deletion dapps/src/handlers/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use std::time::{Instant, Duration};
use fetch::{self, Fetch};
use futures::Future;
use parity_reactor::Remote;
use util::Mutex;
use parking_lot::Mutex;

use hyper::{server, Decoder, Encoder, Next, Method, Control};
use hyper::net::HttpStream;
Expand Down
3 changes: 2 additions & 1 deletion dapps/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ extern crate futures;
extern crate itertools;
extern crate linked_hash_map;
extern crate mime_guess;
extern crate parking_lot;
extern crate rand;
extern crate rustc_hex;
extern crate serde;
Expand Down Expand Up @@ -73,7 +74,7 @@ use std::collections::HashMap;
use std::mem;
use std::path::PathBuf;
use std::sync::Arc;
use util::RwLock;
use parking_lot::RwLock;

use jsonrpc_http_server::{self as http, hyper, Origin};

Expand Down
2 changes: 1 addition & 1 deletion dapps/src/tests/helpers/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

use std::{io, thread, time};
use std::sync::{atomic, mpsc, Arc};
use util::Mutex;
use parking_lot::Mutex;

use futures::{self, Future};
use fetch::{self, Fetch};
Expand Down
3 changes: 2 additions & 1 deletion dapps/src/tests/helpers/registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ use std::collections::HashMap;
use rustc_hex::FromHex;

use hash_fetch::urlhint::ContractClient;
use util::{Bytes, Address, Mutex, H256, ToPretty};
use parking_lot::Mutex;
use util::{Bytes, Address, H256, ToPretty};

const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
Expand Down
1 change: 1 addition & 0 deletions ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ lru-cache = "0.1.0"
native-contracts = { path = "native_contracts" }
num = "0.1"
num_cpus = "1.2"
parking_lot = "0.4"
price-info = { path = "../price-info" }
rand = "0.3"
rlp = { path = "../util/rlp" }
Expand Down
1 change: 1 addition & 0 deletions ethcore/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ log = "0.3"
rlp = { path = "../../util/rlp" }
vm = { path = "../vm" }
parity-wasm = "0.12"
parking_lot = "0.4"
ethcore-logger = { path = "../../logger" }
wasm-utils = { git = "https://github.com/paritytech/wasm-utils" }
hash = { path = "../../util/hash" }
Expand Down
3 changes: 2 additions & 1 deletion ethcore/evm/src/interpreter/shared_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
use std::sync::Arc;
use hash::KECCAK_EMPTY;
use heapsize::HeapSizeOf;
use util::{H256, Mutex};
use parking_lot::Mutex;
use util::H256;
use util::cache::MemoryLruCache;
use bit_set::BitSet;
use super::super::instructions;
Expand Down
1 change: 1 addition & 0 deletions ethcore/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ extern crate ethcore_util as util;
extern crate ethjson;
extern crate rlp;
extern crate parity_wasm;
extern crate parking_lot;
extern crate wasm_utils;
extern crate ethcore_logger;
extern crate heapsize;
Expand Down
1 change: 1 addition & 0 deletions ethcore/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ itertools = "0.5"
bincode = "0.8.0"
serde = "1.0"
serde_derive = "1.0"
parking_lot = "0.4"
stats = { path = "../../util/stats" }
hash = { path = "../../util/hash" }

Expand Down
6 changes: 3 additions & 3 deletions ethcore/light/src/client/header_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ use ethcore::ids::BlockId;

use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
use heapsize::HeapSizeOf;
use util::{H256, U256, RwLock};
use util::{H256, U256};
use util::kvdb::{DBTransaction, KeyValueDB};

use cache::Cache;
use util::Mutex;
use parking_lot::{Mutex, RwLock};

use smallvec::SmallVec;

Expand Down Expand Up @@ -555,7 +555,7 @@ mod tests {
use cache::Cache;

use time::Duration;
use util::Mutex;
use parking_lot::Mutex;

fn make_db() -> Arc<::util::KeyValueDB> {
Arc::new(::util::kvdb::in_memory(0))
Expand Down
3 changes: 2 additions & 1 deletion ethcore/light/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ use ethcore::spec::Spec;
use ethcore::service::ClientIoMessage;
use ethcore::encoded;
use io::IoChannel;
use parking_lot::{Mutex, RwLock};

use util::{H256, U256, Mutex, RwLock};
use util::{H256, U256};
use util::kvdb::{KeyValueDB, CompactionProfile};

use self::header_chain::{AncestryIter, HeaderChain};
Expand Down
6 changes: 3 additions & 3 deletions ethcore/light/src/client/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use io::{IoContext, IoError, IoHandler, IoService};
use util::kvdb::{Database, DatabaseConfig};

use cache::Cache;
use util::Mutex;
use parking_lot::Mutex;

use super::{Client, Config as ClientConfig};

Expand Down Expand Up @@ -117,11 +117,11 @@ mod tests {
use super::Service;
use devtools::RandomTempPath;
use ethcore::spec::Spec;

use std::sync::Arc;
use cache::Cache;
use time::Duration;
use util::Mutex;
use parking_lot::Mutex;

#[test]
fn it_works() {
Expand Down
1 change: 1 addition & 0 deletions ethcore/light/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ extern crate futures;
extern crate itertools;
extern crate rand;
extern crate rlp;
extern crate parking_lot;
#[macro_use]
extern crate rlp_derive;
extern crate serde;
Expand Down
2 changes: 1 addition & 1 deletion ethcore/light/src/net/load_timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use request::{CompleteRequest, Kind};

use bincode;
use time;
use util::{RwLock, Mutex};
use parking_lot::{RwLock, Mutex};

/// Number of time periods samples should be kept for.
pub const MOVING_SAMPLE_SIZE: usize = 256;
Expand Down
5 changes: 3 additions & 2 deletions ethcore/light/src/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ use io::TimerToken;
use network::{HostInfo, NetworkProtocolHandler, NetworkContext, PeerId};
use rlp::{RlpStream, UntrustedRlp};
use util::hash::H256;
use util::{DBValue, Mutex, RwLock, U256};
use util::{DBValue, U256};
use parking_lot::{Mutex, RwLock};
use time::{Duration, SteadyTime};

use std::collections::{HashMap, HashSet};
Expand Down Expand Up @@ -287,7 +288,7 @@ pub type PeerMap = HashMap<PeerId, Mutex<Peer>>;
mod id_guard {

use network::PeerId;
use util::RwLockReadGuard;
use parking_lot::RwLockReadGuard;

use super::{PeerMap, ReqId};

Expand Down
2 changes: 1 addition & 1 deletion ethcore/light/src/net/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ fn id_guard() {
pending_requests.insert(req_id_1, req.clone(), 0.into(), ::time::SteadyTime::now());
pending_requests.insert(req_id_2, req, 1.into(), ::time::SteadyTime::now());

proto.peers.write().insert(peer_id, ::util::Mutex::new(Peer {
proto.peers.write().insert(peer_id, ::parking_lot::Mutex::new(Peer {
local_credits: flow_params.create_credits(),
status: status(provider.client.chain_info()),
capabilities: capabilities.clone(),
Expand Down
2 changes: 1 addition & 1 deletion ethcore/light/src/on_demand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use ethcore::executed::{Executed, ExecutionError};
use futures::{Async, Poll, Future};
use futures::sync::oneshot::{self, Sender, Receiver, Canceled};
use network::PeerId;
use util::{RwLock, Mutex};
use parking_lot::{RwLock, Mutex};

use net::{
self, Handler, PeerStatus, Status, Capabilities,
Expand Down
6 changes: 4 additions & 2 deletions ethcore/light/src/on_demand/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY, KECCAK_EMPTY_LIST_RLP, keccak};
use request::{self as net_request, IncompleteRequest, CompleteRequest, Output, OutputKind, Field};

use rlp::{RlpStream, UntrustedRlp};
use util::{Address, Bytes, DBValue, HashDB, Mutex, H256, U256};
use parking_lot::Mutex;
use util::{Address, Bytes, DBValue, HashDB, H256, U256};
use util::memorydb::MemoryDB;
use util::trie::{Trie, TrieDB, TrieError};

Expand Down Expand Up @@ -850,7 +851,8 @@ impl TransactionProof {
#[cfg(test)]
mod tests {
use super::*;
use util::{MemoryDB, Address, Mutex, H256};
use parking_lot::Mutex;
use util::{MemoryDB, Address, H256};
use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
use util::trie::recorder::Recorder;
use hash::keccak;
Expand Down
3 changes: 2 additions & 1 deletion ethcore/light/src/on_demand/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ use ethcore::header::{Header, Seal};
use futures::Future;
use network::{PeerId, NodeId};
use net::*;
use util::{H256, Mutex};
use parking_lot::Mutex;
use util::H256;
use time::Duration;
use ::request::{self as basic_request, Response};

Expand Down
3 changes: 2 additions & 1 deletion ethcore/light/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ use ethcore::client::{BlockChainClient, ProvingBlockChainClient};
use ethcore::transaction::PendingTransaction;
use ethcore::ids::BlockId;
use ethcore::encoded;
use util::{RwLock, H256};
use parking_lot::RwLock;
use util::H256;

use cht::{self, BlockInfo};
use client::{LightChainClient, AsLightClient};
Expand Down
1 change: 1 addition & 0 deletions ethcore/node_filter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ ethcore-network = { path = "../../util/network" }
native-contracts = { path = "../native_contracts" }
futures = "0.1"
log = "0.3"
parking_lot = "0.4"
4 changes: 3 additions & 1 deletion ethcore/node_filter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern crate ethcore_util as util;
extern crate ethcore_network as network;
extern crate native_contracts;
extern crate futures;
extern crate parking_lot;
#[cfg(test)] extern crate ethcore_io as io;
#[macro_use] extern crate log;

Expand All @@ -29,7 +30,8 @@ use std::collections::HashMap;
use native_contracts::PeerSet as Contract;
use network::{NodeId, ConnectionFilter, ConnectionDirection};
use ethcore::client::{BlockChainClient, BlockId, ChainNotify};
use util::{Mutex, Address, H256, Bytes};
use util::{Address, H256, Bytes};
use parking_lot::Mutex;
use futures::Future;

const MAX_CACHE_SIZE: usize = 4096;
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/account_provider/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use self::stores::{AddressBook, DappsSettingsStore, NewDappsPolicy};
use std::fmt;
use std::collections::{HashMap, HashSet};
use std::time::{Instant, Duration};
use util::{RwLock};
use parking_lot::RwLock;
use ethstore::{
SimpleSecretStore, SecretStore, Error as SSError, EthStore, EthMultiStore,
random_string, SecretVaultRef, StoreAccountRef, OpaqueSecret,
Expand Down
1 change: 1 addition & 0 deletions ethcore/src/blockchain/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use std::mem;
use itertools::Itertools;
use bloomchain as bc;
use heapsize::HeapSizeOf;
use parking_lot::{Mutex, RwLock};
use util::*;
use rlp::*;
use header::*;
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/client/ancient_import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use engines::{Engine, EpochVerifier};
use header::Header;

use rand::Rng;
use util::RwLock;
use parking_lot::RwLock;

// do "heavy" verification on ~1/50 blocks, randomly sampled.
const HEAVY_VERIFY_RATE: f32 = 0.02;
Expand Down
Loading