replace synchronization primitives with those from parking_lot (#1593)

* parking_lot in cargo.toml

* replace all lock invocations with parking_lot ones

* use parking_lot synchronization primitives
This commit is contained in:
Robert Habermeier
2016-07-13 19:59:59 +02:00
committed by Gav Wood
parent 4226c0f631
commit 36d3d0d7d7
50 changed files with 547 additions and 550 deletions

View File

@@ -70,7 +70,7 @@ mod url;
use std::sync::{Arc, Mutex};
use std::net::SocketAddr;
use std::collections::HashMap;
use ethcore_util::misc::Lockable;
use jsonrpc_core::{IoHandler, IoDelegate};
use router::auth::{Authorization, NoAuth, HttpBasicAuth};
use ethcore_rpc::Extendable;
@@ -153,7 +153,7 @@ impl Server {
/// Set callback for panics.
pub fn set_panic_handler<F>(&self, handler: F) where F : Fn() -> () + Send + 'static {
*self.panic_handler.locked() = Some(Box::new(handler));
*self.panic_handler.lock().unwrap() = Some(Box::new(handler));
}
}