File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -459,7 +459,7 @@ fn serve<M: jsonrpc::Metadata, S: jsonrpc::Middleware<M>>(
459
459
) {
460
460
let ( shutdown_signal, local_addr_tx) = signals;
461
461
executor. spawn ( future:: lazy ( move || {
462
- let handle = tokio:: reactor:: Handle :: current ( ) ;
462
+ let handle = tokio:: reactor:: Handle :: default ( ) ;
463
463
464
464
let bind = move || {
465
465
let listener = match addr {
Original file line number Diff line number Diff line change @@ -107,20 +107,15 @@ impl RpcEventLoop {
107
107
}
108
108
109
109
let handle = tb. spawn ( move || {
110
- let mut tp_builder = tokio:: executor:: thread_pool:: Builder :: new ( ) ;
111
-
112
- let pool_size = match num_cpus:: get_physical ( ) {
110
+ let core_threads = match num_cpus:: get_physical ( ) {
113
111
1 => 1 ,
114
112
2 ...4 => 2 ,
115
113
_ => 3 ,
116
114
} ;
117
115
118
- tp_builder
119
- . pool_size ( pool_size)
120
- . name_prefix ( "jsonrpc-eventloop-" ) ;
121
-
122
116
let runtime = tokio:: runtime:: Builder :: new ( )
123
- . threadpool_builder ( tp_builder)
117
+ . core_threads ( core_threads)
118
+ . name_prefix ( "jsonrpc-eventloop-" )
124
119
. build ( ) ;
125
120
126
121
match runtime {
You can’t perform that action at this time.
0 commit comments