aboutsummaryrefslogtreecommitdiff
path: root/p2p/src/backend.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2024-03-20 15:20:21 +0100
committerhozan23 <hozan23@proton.me>2024-03-20 15:20:21 +0100
commit379dca552ca91d22ee007b42f93803ad3dc2b274 (patch)
tree1ba10573b6ec5213baf46f6ab9c3767e0daa4eed /p2p/src/backend.rs
parent340957fec147f4429796413f27bbd9b84ba6f141 (diff)
core: add the option to create a new task group without providing an
executor & remove GlobalExecutor type
Diffstat (limited to 'p2p/src/backend.rs')
-rw-r--r--p2p/src/backend.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/p2p/src/backend.rs b/p2p/src/backend.rs
index 703e7de..d33f3dc 100644
--- a/p2p/src/backend.rs
+++ b/p2p/src/backend.rs
@@ -2,7 +2,7 @@ use std::sync::Arc;
use log::info;
-use karyon_core::{crypto::KeyPair, pubsub::Subscription, GlobalExecutor};
+use karyon_core::{async_util::Executor, crypto::KeyPair, pubsub::Subscription};
use crate::{
config::Config,
@@ -37,7 +37,7 @@ pub struct Backend {
impl Backend {
/// Creates a new Backend.
- pub fn new(key_pair: &KeyPair, config: Config, ex: GlobalExecutor) -> ArcBackend {
+ pub fn new(key_pair: &KeyPair, config: Config, ex: Executor<'static>) -> ArcBackend {
let config = Arc::new(config);
let monitor = Arc::new(Monitor::new());
let conn_queue = ConnQueue::new();