Replace tokio_core with tokio (ring -> 0.13) (#9657)
* Replace `tokio_core` with `tokio`.
* Remove `tokio-core` and replace with `tokio` in
- `ethcore/stratum`
- `secret_store`
- `util/fetch`
- `util/reactor`
* Bump hyper to 0.12 in
- `miner`
- `util/fake-fetch`
- `util/fetch`
- `secret_store`
* Bump `jsonrpc-***` to 0.9 in
- `parity`
- `ethcore/stratum`
- `ipfs`
- `rpc`
- `rpc_client`
- `whisper`
* Bump `ring` to 0.13
* Use a more graceful shutdown process in `secret_store` tests.
* Convert some mutexes to rwlocks in `secret_store`.
* Consolidate Tokio Runtime use, remove `CpuPool`.
* Rename and move the `tokio_reactor` crate (`util/reactor`) to
`tokio_runtime` (`util/runtime`).
* Rename `EventLoop` to `Runtime`.
- Rename `EventLoop::spawn` to `Runtime::with_default_thread_count`.
- Add the `Runtime::with_thread_count` method.
- Rename `Remote` to `Executor`.
* Remove uses of `CpuPool` and spawn all tasks via the `Runtime` executor
instead.
* Other changes related to `CpuPool` removal:
- Remove `Reservations::with_pool`. `::new` now takes an `Executor` as an argument.
- Remove `SenderReservations::with_pool`. `::new` now takes an `Executor` as an argument.
This commit is contained in:
committed by
Afri Schoedon
parent
b8da38f4e4
commit
68ca8df22f
@@ -22,7 +22,6 @@ use std::sync::Arc;
|
||||
|
||||
use sync::ManageNetwork;
|
||||
use fetch::{self, Fetch};
|
||||
use futures_cpupool::CpuPool;
|
||||
use hash::keccak_buffer;
|
||||
|
||||
use jsonrpc_core::{Result, BoxFuture};
|
||||
@@ -35,16 +34,14 @@ use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction};
|
||||
pub struct ParitySetClient<F> {
|
||||
net: Arc<ManageNetwork>,
|
||||
fetch: F,
|
||||
pool: CpuPool,
|
||||
}
|
||||
|
||||
impl<F: Fetch> ParitySetClient<F> {
|
||||
/// Creates new `ParitySetClient` with given `Fetch`.
|
||||
pub fn new(net: Arc<ManageNetwork>, fetch: F, p: CpuPool) -> Self {
|
||||
pub fn new(net: Arc<ManageNetwork>, fetch: F) -> Self {
|
||||
ParitySetClient {
|
||||
net: net,
|
||||
fetch: fetch,
|
||||
pool: p,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,7 +131,7 @@ impl<F: Fetch> ParitySet for ParitySetClient<F> {
|
||||
})
|
||||
.map(Into::into)
|
||||
});
|
||||
Box::new(self.pool.spawn(future))
|
||||
Box::new(future)
|
||||
}
|
||||
|
||||
fn upgrade_ready(&self) -> Result<Option<ReleaseInfo>> {
|
||||
|
||||
Reference in New Issue
Block a user