mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 17:07:56 +00:00
RpcHandlers Refactorings (#6846)
* allow access to the underlying Pubsub instance from RpcHandlers * bump Cargo.lock * no more Arc<RpcHandlers> * bump Cargo.lock * Debug,. * Arc<RpcHandlers> * RpcHandler * RpcHandlers::io_handler * remove chain spec from cli * address pr comments * remove stray newline Co-authored-by: Ashley <ashley.ruglys@gmail.com> Co-authored-by: Tomasz Drwięga <tomasz@parity.io> Co-authored-by: Ashley <ashley.ruglys@gmail.com>
This commit is contained in:
@@ -336,9 +336,12 @@ impl TaskManager {
|
||||
}
|
||||
}
|
||||
|
||||
/// Set what the task manager should keep alive.
|
||||
pub(super) fn keep_alive<T: 'static + Send + Sync>(&mut self, to_keep_alive: T) {
|
||||
self.keep_alive = Box::new(to_keep_alive);
|
||||
/// Set what the task manager should keep alive, can be called multiple times.
|
||||
pub fn keep_alive<T: 'static + Send + Sync>(&mut self, to_keep_alive: T) {
|
||||
// allows this fn to safely called multiple times.
|
||||
use std::mem;
|
||||
let old = mem::replace(&mut self.keep_alive, Box::new(()));
|
||||
self.keep_alive = Box::new((to_keep_alive, old));
|
||||
}
|
||||
|
||||
/// Register another TaskManager to terminate and gracefully shutdown when the parent
|
||||
|
||||
Reference in New Issue
Block a user