remove re-export of parking_lot in util (#6435)

This commit is contained in:
Hawstein
2017-09-03 02:09:13 +08:00
committed by Gav Wood
parent 1d95fe481f
commit 7b8af30590
99 changed files with 161 additions and 75 deletions

View File

@@ -155,6 +155,7 @@ pub fn execute(cmd: BlockchainCmd) -> Result<(), String> {
fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
use light::client::{Service as LightClientService, Config as LightClientConfig};
use light::cache::Cache as LightDataCache;
use parking_lot::Mutex;
let timer = Instant::now();
@@ -188,7 +189,7 @@ fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
// create dirs used by parity
cmd.dirs.create_dirs(false, false, false)?;
let cache = Arc::new(::util::Mutex::new(
let cache = Arc::new(Mutex::new(
LightDataCache::new(Default::default(), ::time::Duration::seconds(0))
));

View File

@@ -35,7 +35,8 @@ use light::client::LightChainClient;
use number_prefix::{binary_prefix, Standalone, Prefixed};
use parity_rpc::{is_major_importing};
use parity_rpc::informant::RpcStats;
use util::{RwLock, Mutex, H256, Bytes};
use parking_lot::{RwLock, Mutex};
use util::{H256, Bytes};
/// Format byte counts to standard denominations.
pub fn format_bytes(b: usize) -> String {

View File

@@ -31,7 +31,7 @@ use futures::{future, Future};
use parity_reactor::Remote;
use util::RwLock;
use parking_lot::RwLock;
// Attepmt to cull once every 10 minutes.
const TOKEN: TimerToken = 1;

View File

@@ -34,6 +34,7 @@ extern crate isatty;
extern crate jsonrpc_core;
extern crate num_cpus;
extern crate number_prefix;
extern crate parking_lot;
extern crate regex;
extern crate rlp;
extern crate rpassword;

View File

@@ -38,7 +38,7 @@ use parity_rpc::dispatch::{FullDispatcher, LightDispatcher};
use parity_rpc::informant::{ActivityNotifier, ClientNotifier};
use parity_rpc::{Metadata, NetworkSettings};
use updater::Updater;
use util::{Mutex, RwLock};
use parking_lot::{Mutex, RwLock};
#[derive(Debug, PartialEq, Clone, Eq, Hash)]
pub enum Api {

View File

@@ -37,8 +37,9 @@ use node_health;
use parity_reactor::EventLoop;
use parity_rpc::{NetworkSettings, informant, is_major_importing};
use updater::{UpdatePolicy, Updater};
use util::{version, Mutex, Condvar};
use ansi_term::Colour;
use util::version;
use parking_lot::{Condvar, Mutex};
use node_filter::NodeFilter;
use params::{
@@ -171,7 +172,7 @@ impl ::local_store::NodeInfo for FullNodeInfo {
fn execute_light(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> Result<(bool, Option<String>), String> {
use light::client as light_client;
use ethsync::{LightSyncParams, LightSync, ManageNetwork};
use util::RwLock;
use parking_lot::{Mutex, RwLock};
// load spec
let spec = cmd.spec.spec(&cmd.dirs.cache)?;
@@ -206,7 +207,7 @@ fn execute_light(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) ->
// TODO: configurable cache size.
let cache = LightDataCache::new(Default::default(), ::time::Duration::minutes(GAS_CORPUS_EXPIRATION_MINUTES));
let cache = Arc::new(::util::Mutex::new(cache));
let cache = Arc::new(Mutex::new(cache));
// start client and create transaction queue.
let mut config = light_client::Config {