aboutsummaryrefslogtreecommitdiff
path: root/p2p/src/peer
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/peer
parent340957fec147f4429796413f27bbd9b84ba6f141 (diff)
core: add the option to create a new task group without providing an
executor & remove GlobalExecutor type
Diffstat (limited to 'p2p/src/peer')
-rw-r--r--p2p/src/peer/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/p2p/src/peer/mod.rs b/p2p/src/peer/mod.rs
index 1e98f1b..1fc5ccf 100644
--- a/p2p/src/peer/mod.rs
+++ b/p2p/src/peer/mod.rs
@@ -11,10 +11,9 @@ use smol::{
};
use karyon_core::{
- async_util::{select, Either, TaskGroup, TaskResult},
+ async_util::{select, Either, Executor, TaskGroup, TaskResult},
event::{ArcEventSys, EventListener, EventSys},
util::{decode, encode},
- GlobalExecutor,
};
use karyon_net::Endpoint;
@@ -67,7 +66,7 @@ impl Peer {
codec: Codec,
remote_endpoint: Endpoint,
conn_direction: ConnDirection,
- ex: GlobalExecutor,
+ ex: Executor<'static>,
) -> ArcPeer {
Arc::new(Peer {
id: id.clone(),